/** * Initialization */ static PlayMakerExtension() { // Don't sync PlayMakerGUI because PlayMaker can create it automatically. SceneFusionAPI.DontSyncObjectsWith <PlayMakerGUI>(); // Register property change handlers SceneFusionAPI.RegisterPropertyChangeHandler <PlayMakerFSM>(OnPropertyChange); // Register on connect/disconnect handler SceneFusionAPI.OnConnect += OnConnect; SceneFusionAPI.OnDisconnect += OnDisconnect; // Register on spawn request handler SceneFusionAPI.OnSpawn += OnSpawn; // Register on lock/unlock handler SceneFusionAPI.OnLock += OnLock; SceneFusionAPI.OnUnlock += OnUnlock; // Register on add/remove component handler SceneFusionAPI.OnAddComponent += OnAddComponent; SceneFusionAPI.OnRemoveComponent += OnRemoveComponent; // Sync hidden property fsm on PlayMakerFSM SceneFusionAPI.SyncHiddenProperties <PlayMakerFSM>("fsm"); EditorApplication.update += Update; }
/** * Initialization */ static ProBuilderExtension() { // Register property change handler SceneFusionAPI.RegisterPropertyChangeHandler <pb_Object>(OnPropertyChange); // Register before spawn request handler SceneFusionAPI.BeforeFirstSync += BeforeSpawnRequest; // Register on selection update handler. This is also invoked when geometry changes which is what we want // it for. pb_Editor.OnSelectionUpdate += OnGeometryChange; // Register on mesh compile handler. pb_EditorUtility.AddOnMeshCompiledListener(OnMeshCompiled); EditorApplication.update += Update; }
/** * Initialization */ static Ferr2DExtension() { // Ferr2D does not respect NotEditable hide flags so we have to explicitly prevent edits to Ferr2D // components on locked objects. SceneFusionAPI.PreventEditsWhileLocked <Ferr2D_Path>(); SceneFusionAPI.PreventEditsWhileLocked <Ferr2DT_PathTerrain>(); // Register property change handlers SceneFusionAPI.RegisterPropertyChangeHandler <Ferr2D_Path>(OnPropertyChange); SceneFusionAPI.RegisterPropertyChangeHandler <Ferr2DT_PathTerrain>(OnPropertyChange); SceneFusionAPI.RegisterPropertyChangeHandler <sfFerr2DAdaptor>(OnPropertyChange); // Register before spawn request handler SceneFusionAPI.BeforeFirstSync += BeforeFirstSync; // Register new Ferr2D mesh callback sfFerr2DAdaptor.NewFerr2DMeshCallback = OnNewFerr2DMesh; // Sync hidden property m_SortingOrder on MeshRenderers SceneFusionAPI.SyncHiddenProperties <MeshRenderer>("m_SortingOrder"); EditorApplication.update += Update; }