public void CreatePresetObject(int i)
    {
        PlaygroundParticlesC instantiatedPreset = PlaygroundC.InstantiatePreset(presetObjects[i].presetObject.name);

        if (instantiatedPreset)
        {
            Selection.activeGameObject = instantiatedPreset.particleSystemGameObject;
        }
    }
예제 #2
0
    // 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();
        }
    }