首次提交
This commit is contained in:
16
Assets/Plugins/FairyGUI/Examples/Particles/CoolComponent.cs
Normal file
16
Assets/Plugins/FairyGUI/Examples/Particles/CoolComponent.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user