void OnEnable() { string str = getPath("DartsMenuData"); if (m_SerialziedThing == null) { m_SerialziedThing = AssetDatabase.LoadAssetAtPath(str, typeof(FMGData))as FMGData; if(m_SerialziedThing==null) { m_SerialziedThing= ScriptableObject.CreateInstance<FMGData> (); AssetDatabase.CreateAsset(m_SerialziedThing,str); } } m_object=m_SerialziedThing; }
void OnEnable() { string str = getPath("DartsMenuData"); if (m_SerialziedThing == null) { m_SerialziedThing = AssetDatabase.LoadAssetAtPath(str, typeof(FMGData)) as FMGData; if (m_SerialziedThing == null) { m_SerialziedThing = ScriptableObject.CreateInstance <FMGData> (); AssetDatabase.CreateAsset(m_SerialziedThing, str); } } m_object = m_SerialziedThing; }