void Start() { mReconstructionBehaviour = GetComponent <ReconstructionBehaviour>(); if (mReconstructionBehaviour) { mReconstructionBehaviour.RegisterInitializedCallback(OnInitialized); mReconstructionBehaviour.RegisterPropCreatedCallback(OnPropCreated); mReconstructionBehaviour.RegisterSurfaceCreatedCallback(OnSurfaceCreated); } }
//对回调函数进行注册 void Start() { //获取Smart Terrain Tracker 与 Reconstruction mReconstructionBehaviour = GetComponent <ReconstructionBehaviour>(); DT_Tracker = TrackerManager.Instance.GetTracker <SmartTerrainTracker>(); if (mReconstructionBehaviour) { mReconstructionBehaviour.RegisterInitializedCallback(OnInitialized); mReconstructionBehaviour.RegisterPropCreatedCallback(OnPropCreated); mReconstructionBehaviour.RegisterSurfaceCreatedCallback(OnSurfaceCreated); } }