private SerializedMemberStore Create(BehaviourGraphSMS inst) { AssetDatabase.CreateFolder("Assets", "Resources"); AssetDatabase.CreateAsset(inst, @"Assets/Resources/" + inst.name + ".asset"); AssetDatabase.SaveAssets(); AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(inst)); AssetDatabase.Refresh(); inst.ReflectAndStore(); instance = inst; return(instance); }
public static ValueDropdownList <string> GetCachedMemberDropdown() { if (cachedValueDropdown != null) { return(cachedValueDropdown); } cachedValueDropdown = new ValueDropdownList <string>(); if (BehaviourGraphSMS.TryGetMembersByAttribute <Attr>(out var members)) { foreach (var member in members) { string memberReflectName = BehaviourGraphSMS.MemberToString(member); cachedValueDropdown.Add(memberReflectName, memberReflectName); } } return(cachedValueDropdown); }
public static bool TryGetCachedMemberViaLookupValue(string value, out MemberInfo info) { info = BehaviourGraphSMS.LookupByString(value); return(info != null); }