public void CreatePresetObject(int i) { PlaygroundParticlesC instantiatedPreset = PlaygroundC.InstantiatePreset(presetObjects[i].presetObject.name); if (instantiatedPreset) { Selection.activeGameObject = instantiatedPreset.particleSystemGameObject; } }
// User created preset public void CreatePresetObject(int i) { PlaygroundParticlesC instantiatedPreset; if (!AssetDatabase.GetAssetPath(presetObjects[i].presetObject).Contains("Resources/")) { instantiatedPreset = InstantiateEditorPreset(presetObjects[i].presetObject); } else { instantiatedPreset = PlaygroundC.InstantiatePreset(presetObjects[i].presetObject.name); } if (instantiatedPreset != null) { instantiatedPreset.EditorYieldSelect(); } }