using UnityEngine; namespace Thousandto.SkillEditor.Support { public class EditorVFXLoader { public static EditorVFXScript Load(string path) { if (string.IsNullOrEmpty(path)) return null; var obj = Resources.Load(path) as GameObject; if (obj != null) { GameObject result = GameObject.Instantiate(obj) as GameObject; var script = result.GetComponent(); if(script == null) { script = result.AddComponent(); } script.gameObject.SetActive(true); return script; } return null; } } }