Add support for compiling and running engine without C# scripting
(configurable via `EngineConfiguration.UseCSharp` in Flax.Build)
This commit is contained in:
@@ -20,15 +20,15 @@ protected:
|
||||
#endif
|
||||
|
||||
MClass* _parentClass;
|
||||
|
||||
MString _name;
|
||||
MVisibility _visibility;
|
||||
|
||||
Array<MonoObject*> _attributes;
|
||||
MVisibility _visibility;
|
||||
|
||||
int32 _hasCachedAttributes : 1;
|
||||
int32 _isStatic : 1;
|
||||
|
||||
Array<MObject*> _attributes;
|
||||
|
||||
public:
|
||||
|
||||
#if USE_MONO
|
||||
@@ -40,7 +40,6 @@ public:
|
||||
/// <summary>
|
||||
/// Gets field name.
|
||||
/// </summary>
|
||||
/// <returns>The field name.</returns>
|
||||
FORCE_INLINE const MString& GetName() const
|
||||
{
|
||||
return _name;
|
||||
@@ -49,7 +48,6 @@ public:
|
||||
/// <summary>
|
||||
/// Returns the parent class that this method is contained with.
|
||||
/// </summary>
|
||||
/// <returns>The parent class.</returns>
|
||||
FORCE_INLINE MClass* GetParentClass() const
|
||||
{
|
||||
return _parentClass;
|
||||
@@ -58,19 +56,16 @@ public:
|
||||
/// <summary>
|
||||
/// Gets field type class.
|
||||
/// </summary>
|
||||
/// <returns>The field type.</returns>
|
||||
MType GetType() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the field offset (in bytes) from the start of the parent object.
|
||||
/// </summary>
|
||||
/// <returns>The field offset in bytes.</returns>
|
||||
int32 GetOffset() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets field visibility in the class.
|
||||
/// </summary>
|
||||
/// <returns>The field visibility.</returns>
|
||||
FORCE_INLINE MVisibility GetVisibility() const
|
||||
{
|
||||
return _visibility;
|
||||
@@ -79,23 +74,19 @@ public:
|
||||
/// <summary>
|
||||
/// Returns true if field is static.
|
||||
/// </summary>
|
||||
/// <returns>True if is static, otherwise false.</returns>
|
||||
FORCE_INLINE bool IsStatic() const
|
||||
{
|
||||
return _isStatic != 0;
|
||||
}
|
||||
|
||||
#if USE_MONO
|
||||
|
||||
/// <summary>
|
||||
/// Gets mono field handle.
|
||||
/// </summary>
|
||||
/// <returns>The Mono field object.</returns>
|
||||
FORCE_INLINE MonoClassField* GetNative() const
|
||||
{
|
||||
return _monoField;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
public:
|
||||
@@ -104,28 +95,28 @@ public:
|
||||
/// Retrieves value currently set in the field on the specified object instance. If field is static object instance can be null.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Value will be a pointer to raw data type for value types (for example int, float), and a MonoObject* for reference types.
|
||||
/// Value will be a pointer to raw data type for value types (for example int, float), and a MObject* for reference types.
|
||||
/// </remarks>
|
||||
/// <param name="instance">The object of given type to get value from.</param>
|
||||
/// <param name="result">The return value of undefined type.</param>
|
||||
void GetValue(MonoObject* instance, void* result) const;
|
||||
void GetValue(MObject* instance, void* result) const;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves value currently set in the field on the specified object instance. If field is static object instance can be null. If returned value is a value type it will be boxed.
|
||||
/// </summary>
|
||||
/// <param name="instance">The object of given type to get value from.</param>
|
||||
/// <returns>The boxed value object.</returns>
|
||||
MonoObject* GetValueBoxed(MonoObject* instance) const;
|
||||
MObject* GetValueBoxed(MObject* instance) const;
|
||||
|
||||
/// <summary>
|
||||
/// Sets a value for the field on the specified object instance. If field is static object instance can be null.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Value should be a pointer to raw data type for value types (for example int, float), and a MonoObject* for reference types.
|
||||
/// Value should be a pointer to raw data type for value types (for example int, float), and a MObject* for reference types.
|
||||
/// </remarks>
|
||||
/// <param name="instance">The object of given type to set value to.</param>
|
||||
/// <param name="value">Th value of undefined type.</param>
|
||||
void SetValue(MonoObject* instance, void* value) const;
|
||||
void SetValue(MObject* instance, void* value) const;
|
||||
|
||||
public:
|
||||
|
||||
@@ -147,11 +138,11 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="monoClass">The attribute class to take.</param>
|
||||
/// <returns>The attribute object.</returns>
|
||||
MonoObject* GetAttribute(MClass* monoClass) const;
|
||||
MObject* GetAttribute(MClass* monoClass) const;
|
||||
|
||||
/// <summary>
|
||||
/// Returns an instance of all attributes connected with given field. Returns null if the field doesn't have any attributes.
|
||||
/// </summary>
|
||||
/// <returns>The array of attribute objects.</returns>
|
||||
const Array<MonoObject*>& GetAttributes();
|
||||
const Array<MObject*>& GetAttributes();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user