Files
Fishing2/Assets/Scripts/NBC/Runtime/Plugins/FairyGUI/Examples~/Particles/CoolComponent.cs
2025-08-08 09:12:30 +08:00

17 lines
420 B
C#

using UnityEngine;
using FairyGUI;
public class CoolComponent : GComponent
{
public override void ConstructFromXML(FairyGUI.Utils.XML cxml)
{
base.ConstructFromXML(cxml);
GGraph graph = this.GetChild("effect").asGraph;
Object prefab = Resources.Load("Flame");
GameObject go = (GameObject)Object.Instantiate(prefab);
graph.SetNativeObject(new GoWrapper(go));
}
}