Refactor scene objects initialization to call OnAwake before all OnStart
#520
This commit is contained in:
@@ -10,12 +10,11 @@
|
||||
/// </summary>
|
||||
API_CLASS(Abstract) class FLAXENGINE_API Script : public SceneObject
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE(Script);
|
||||
DECLARE_SCRIPTING_TYPE(Script);
|
||||
friend Actor;
|
||||
friend SceneTicking;
|
||||
friend class PrefabInstanceData;
|
||||
protected:
|
||||
|
||||
int32 _enabled : 1;
|
||||
int32 _tickFixedUpdate : 1;
|
||||
int32 _tickUpdate : 1;
|
||||
@@ -27,7 +26,6 @@ protected:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets value indicating if script is active.
|
||||
/// </summary>
|
||||
@@ -54,7 +52,6 @@ public:
|
||||
API_PROPERTY() void SetActor(Actor* value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Called after the object is loaded.
|
||||
/// </summary>
|
||||
@@ -77,7 +74,7 @@ public:
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before the object will be destroyed..
|
||||
/// Called before the object will be destroyed.
|
||||
/// </summary>
|
||||
API_FUNCTION(Attributes="NoAnimate") virtual void OnDestroy()
|
||||
{
|
||||
@@ -126,14 +123,12 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void SetupType();
|
||||
void Start();
|
||||
void Enable();
|
||||
void Disable();
|
||||
|
||||
public:
|
||||
|
||||
// [ScriptingObject]
|
||||
String ToString() const override;
|
||||
void OnDeleteObject() override;
|
||||
@@ -143,8 +138,7 @@ public:
|
||||
void SetParent(Actor* value, bool canBreakPrefabLink = true) override;
|
||||
int32 GetOrderInParent() const override;
|
||||
void SetOrderInParent(int32 index) override;
|
||||
void PostLoad() override;
|
||||
void PostSpawn() override;
|
||||
void Initialize() override;
|
||||
void BeginPlay(SceneBeginData* data) override;
|
||||
void EndPlay() override;
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
|
||||
Reference in New Issue
Block a user