virtual public void ClearScriptObject() { if (mIsDestory) { return; } mIsDestory = true; CallFunctionVoid("OnDestroy"); if (mOnGUIDelegate != null) { mOnGUIDelegate.Dispose(); mOnGUIDelegate = null; } if (mLateUpdateDelegate != null) { mLateUpdateDelegate.Dispose(); mLateUpdateDelegate = null; } if (mFixedUpdateDelegate != null) { mFixedUpdateDelegate.Dispose(); mFixedUpdateDelegate = null; } if (mUpdateDelegate != null) { mUpdateDelegate.Dispose(); mUpdateDelegate = null; } mObject = null; mScriptType = null; mCodeTool = null; }
virtual public void ClearScriptObject() { if (mIsDestory) { return; } mIsDestory = true; CallScriptFunctionByName("OnDestroy"); if (mCore != null) { mCore.RemveScriptInterface(this); mCore = null; } if (mOnGUIDelegate != null) { mOnGUIDelegate.Dispose(); mOnGUIDelegate = null; } if (mLateUpdateDelegate != null) { mLateUpdateDelegate.Dispose(); mLateUpdateDelegate = null; } if (mFixedUpdateDelegate != null) { mFixedUpdateDelegate.Dispose(); mFixedUpdateDelegate = null; } if (mUpdateDelegate != null) { mUpdateDelegate.Dispose(); mUpdateDelegate = null; } mObject = null; mScriptType = null; mCodeTool = null; }