Exemplo n.º 1
0
        // Delegate for generic updates
        void OnFirstUpdate()
        {
            had_first_update          = true;
            EditorApplication.update -= OnFirstUpdate;
            RealtimeCSG.CSGSettings.Reload();

            // register unity methods in the c++ code so that some unity functions
            // (such as debug.log) can be called from within the c++ code.
            NativeMethodBindings.RegisterUnityMethods();

            // register dll methods so we can use them
            NativeMethodBindings.RegisterExternalMethods();

            RunOnce();
            //CreateSceneChangeDetector();
        }
Exemplo n.º 2
0
        public static void ForceRebuildAll()
        {
            Clear();

            if (External == null ||
                External.ResetCSG == null)
            {
                NativeMethodBindings.RegisterUnityMethods();
                NativeMethodBindings.RegisterExternalMethods();
            }

            ClearMeshInstances();

            if (RegisterAllComponents())
            {
                External.ResetCSG();
            }
        }
Exemplo n.º 3
0
        public static void InitOnNewScene()
        {
            if (EditorApplication.isPlayingOrWillChangePlaymode)
            {
                return;
            }

            if (External == null ||
                External.ResetCSG == null)
            {
                NativeMethodBindings.RegisterUnityMethods();
                NativeMethodBindings.RegisterExternalMethods();
            }

            if (External == null)
            {
                return;
            }

            if (RegisterAllComponents())
            {
                External.ResetCSG();
            }
        }