コード例 #1
0
 void Start()
 {
     mReconstructionBehaviour = GetComponent <ReconstructionBehaviour>();
     if (mReconstructionBehaviour)
     {
         mReconstructionBehaviour.RegisterInitializedCallback(OnInitialized);
         mReconstructionBehaviour.RegisterPropCreatedCallback(OnPropCreated);
         mReconstructionBehaviour.RegisterSurfaceCreatedCallback(OnSurfaceCreated);
     }
 }
コード例 #2
0
    //对回调函数进行注册
    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);
        }
    }