VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
virtual void AVR.UEditor.Core.AVR_WizardHook< Wiz >.safeDestroyImmediate ( GameObject  toDestroy,
GameObject  wizardTarget 
)
inlineprotectedvirtual

Definition at line 120 of file AVR_HookableWizard.cs.

120  {
121  try {
122  GameObject.DestroyImmediate(toDestroy);
123  }
124  catch(System.InvalidOperationException) {
125  PrefabUtility.UnpackPrefabInstance(wizardTarget, PrefabUnpackMode.OutermostRoot, InteractionMode.AutomatedAction);
126  GameObject.DestroyImmediate(toDestroy);
127  }
128  }