// public static void ShowBundle(BundleData newBundle) { // Show dummy object in inspector if (sbInspectorObj == null) { sbInspectorObj = ScriptableObject.CreateInstance <SceneBundleInpectorObj>(); sbInspectorObj.hideFlags = HideFlags.DontSave; } if (abInpsectorObj == null) { abInpsectorObj = ScriptableObject.CreateInstance <AssetBundleInspectorObj>(); abInpsectorObj.hideFlags = HideFlags.DontSave; } if (newBundle != null) { Selection.activeObject = newBundle.sceneBundle? (Object)sbInspectorObj : (Object)abInpsectorObj; } else { Selection.activeObject = null; } // Update bundle if (newBundle == currentBundle) { return; } currentBundle = newBundle; Refresh(); }
// public static void ShowBundle(BundleData newBundle) { // Show dummy object in inspector if(sbInspectorObj == null) { sbInspectorObj = ScriptableObject.CreateInstance<SceneBundleInpectorObj>(); sbInspectorObj.hideFlags = HideFlags.DontSave; } if(abInpsectorObj == null) { abInpsectorObj = ScriptableObject.CreateInstance<AssetBundleInspectorObj>(); abInpsectorObj.hideFlags = HideFlags.DontSave; } if(newBundle != null) Selection.activeObject = newBundle.sceneBundle? (Object)sbInspectorObj : (Object)abInpsectorObj; else Selection.activeObject = null; // Update bundle if(newBundle == currentBundle) return; currentBundle = newBundle; Refresh(); }
// public static void ShowBundle(BundleData newBundle) { // Show dummy object in inspector if (sbInspectorObj == null) { sbInspectorObj = ScriptableObject.CreateInstance <SceneBundleInpectorObj>(); sbInspectorObj.hideFlags = HideFlags.DontSave; } if (abInpsectorObj == null) { abInpsectorObj = ScriptableObject.CreateInstance <AssetBundleInspectorObj>(); abInpsectorObj.hideFlags = HideFlags.DontSave; } if (tbInpsectorObj == null) { tbInpsectorObj = ScriptableObject.CreateInstance <TextBundleInspectorObj>(); tbInpsectorObj.hideFlags = HideFlags.DontSave; } if (newBundle != null) { switch (newBundle.bundleType) { case BundleType.Normal: Selection.activeObject = abInpsectorObj; break; case BundleType.Scene: Selection.activeObject = sbInspectorObj; break; case BundleType.Text: Selection.activeObject = tbInpsectorObj; break; default: Selection.activeObject = null; break; } } else { Selection.activeObject = null; } // Update bundle if (newBundle == currentBundle) { return; } currentBundle = newBundle; Refresh(); }