public StateLink AddStateLink() { StateLink sl = CreateInstance <StateLink>(); sl.Init(this); GuidManager.GetGameByChain(this).Dirty = true; links.Add(sl); return(sl); }
private void OnEnable() { link = (StateLink)target; game = AssetDatabase.LoadAssetAtPath <PathGame>(AssetDatabase.GetAssetPath(link)) as PathGame; if (link.chain == null) { link.chain = game.chains[0]; link.state = link.chain.StartState; } }
public void RemoveStateLink(StateLink link) { links.Remove(link); GuidManager.GetGameByChain(this).Dirty = true; }