|
@@ -33,7 +33,8 @@ namespace BansheeEngine
|
|
|
: mBaseTypesInitialized(false), mSystemArrayClass(nullptr), mSystemGenericListClass(nullptr)
|
|
: mBaseTypesInitialized(false), mSystemArrayClass(nullptr), mSystemGenericListClass(nullptr)
|
|
|
, mSystemGenericDictionaryClass(nullptr), mSystemTypeClass(nullptr), mComponentClass(nullptr)
|
|
, mSystemGenericDictionaryClass(nullptr), mSystemTypeClass(nullptr), mComponentClass(nullptr)
|
|
|
, mSceneObjectClass(nullptr), mMissingComponentClass(nullptr), mSerializeObjectAttribute(nullptr)
|
|
, mSceneObjectClass(nullptr), mMissingComponentClass(nullptr), mSerializeObjectAttribute(nullptr)
|
|
|
- , mDontSerializeFieldAttribute(nullptr), mSerializeFieldAttribute(nullptr), mHideInInspectorAttribute(nullptr), mRangeAttribute(nullptr)
|
|
|
|
|
|
|
+ , mDontSerializeFieldAttribute(nullptr), mSerializeFieldAttribute(nullptr), mHideInInspectorAttribute(nullptr)
|
|
|
|
|
+ , mRangeAttribute(nullptr), mStepAttribute(nullptr)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -140,6 +141,8 @@ namespace BansheeEngine
|
|
|
}
|
|
}
|
|
|
if (field->hasAttribute(mRangeAttribute))
|
|
if (field->hasAttribute(mRangeAttribute))
|
|
|
fieldInfo->mFlags = (ScriptFieldFlags)((UINT32)fieldInfo->mFlags | (UINT32)ScriptFieldFlags::Range);
|
|
fieldInfo->mFlags = (ScriptFieldFlags)((UINT32)fieldInfo->mFlags | (UINT32)ScriptFieldFlags::Range);
|
|
|
|
|
+ if (field->hasAttribute(mStepAttribute))
|
|
|
|
|
+ fieldInfo->mFlags = (ScriptFieldFlags)((UINT32)fieldInfo->mFlags | (UINT32)ScriptFieldFlags::Step);
|
|
|
|
|
|
|
|
objInfo->mFieldNameToId[fieldInfo->mName] = fieldInfo->mFieldId;
|
|
objInfo->mFieldNameToId[fieldInfo->mName] = fieldInfo->mFieldId;
|
|
|
objInfo->mFields[fieldInfo->mFieldId] = fieldInfo;
|
|
objInfo->mFields[fieldInfo->mFieldId] = fieldInfo;
|
|
@@ -436,6 +439,7 @@ namespace BansheeEngine
|
|
|
mSerializeFieldAttribute = nullptr;
|
|
mSerializeFieldAttribute = nullptr;
|
|
|
mHideInInspectorAttribute = nullptr;
|
|
mHideInInspectorAttribute = nullptr;
|
|
|
mRangeAttribute = nullptr;
|
|
mRangeAttribute = nullptr;
|
|
|
|
|
+ mStepAttribute = nullptr;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void ScriptAssemblyManager::initializeBaseTypes()
|
|
void ScriptAssemblyManager::initializeBaseTypes()
|
|
@@ -477,6 +481,10 @@ namespace BansheeEngine
|
|
|
if (mRangeAttribute == nullptr)
|
|
if (mRangeAttribute == nullptr)
|
|
|
BS_EXCEPT(InvalidStateException, "Cannot find Range managed class.");
|
|
BS_EXCEPT(InvalidStateException, "Cannot find Range managed class.");
|
|
|
|
|
|
|
|
|
|
+ mStepAttribute = bansheeEngineAssembly->getClass("BansheeEngine", "Step");
|
|
|
|
|
+ if (mStepAttribute == nullptr)
|
|
|
|
|
+ BS_EXCEPT(InvalidStateException, "Cannot find Step managed class.");
|
|
|
|
|
+
|
|
|
mComponentClass = bansheeEngineAssembly->getClass("BansheeEngine", "Component");
|
|
mComponentClass = bansheeEngineAssembly->getClass("BansheeEngine", "Component");
|
|
|
if(mComponentClass == nullptr)
|
|
if(mComponentClass == nullptr)
|
|
|
BS_EXCEPT(InvalidStateException, "Cannot find Component managed class.");
|
|
BS_EXCEPT(InvalidStateException, "Cannot find Component managed class.");
|