public virtual void OnEnable() { ConcaveShape = target as FSConcaveShapeComponent; EditTarget = new SerializedObject(ConcaveShape); FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }
public virtual void OnEnable() { target0 = target as FSConcaveShapeComponent; EditTarget = new SerializedObject(target0); FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }
public static void Load() { // path setup string path = Application.dataPath + "/Editor/FarseerComponents/SerializedSettings"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } //setup vars FileStream fs; XmlSerializer xmls; //FSCategorySettings if (File.Exists(path + "/FSCategorySettings.cfg")) { xmls = new XmlSerializer(typeof(FSCategorySettings)); fs = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open); categorySettings = xmls.Deserialize(fs) as FSCategorySettings; fs.Close(); } else { categorySettings = new FSCategorySettings(); } }
public static void Load(FSSettingsPlatform platform) { // path setup string path = Application.dataPath + "/FarseerUnity/Editor/SerializedSettings"; //Debug.Log("PATH: " +path); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } //setup vars FileStream fs; XmlSerializer xmls; //Debug.Log("PATH2: " +path + "/FSCoreSettings_" + platform.ToString() + ".cfg"); //FSCoreSettings if (File.Exists(path + "/FSCoreSettings_" + platform.ToString() + ".cfg")) { //Debug.Log("EXISTS"); xmls = new XmlSerializer(typeof(FSCoreSettings)); fs = new FileStream(path + "/FSCoreSettings_" + platform.ToString() + ".cfg", FileMode.Open); coreSettings = xmls.Deserialize(fs) as FSCoreSettings; //Debug.Log(coreSettings); fs.Close(); } else { coreSettings = new FSCoreSettings(); } //FSCategorySettings if (File.Exists(path + "/FSCategorySettings.cfg")) { xmls = new XmlSerializer(typeof(FSCategorySettings)); fs = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open); categorySettings = xmls.Deserialize(fs) as FSCategorySettings; fs.Close(); } else { categorySettings = new FSCategorySettings(); } lastPlatform = platform; }
public static void Load() { // path setup string path = Application.dataPath + "/Editor/FarseerComponents/SerializedSettings"; if(!Directory.Exists(path)) Directory.CreateDirectory(path); //setup vars FileStream fs; XmlSerializer xmls; //FSCategorySettings if(File.Exists(path + "/FSCategorySettings.cfg")) { xmls = new XmlSerializer(typeof(FSCategorySettings)); fs = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open); categorySettings = xmls.Deserialize(fs) as FSCategorySettings; fs.Close(); } else { categorySettings = new FSCategorySettings(); } }
public void Setup() { FSSettings.Load(); loadedFSCategorySettings = FSSettings.CategorySettings; }
protected virtual void Awake() { target0 = target as FSCollisionGroup; FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }
public static void Load(FSSettingsPlatform platform) { // path setup string path = Application.dataPath + "/FarseerUnity/Editor/SerializedSettings"; if(!Directory.Exists(path)) Directory.CreateDirectory(path); //setup vars FileStream fs; XmlSerializer xmls; //FSCoreSettings if(File.Exists(path + "/FSCoreSettings_" + platform.ToString() + ".cfg")) { xmls = new XmlSerializer(typeof(FSCoreSettings)); fs = new FileStream(path + "/FSCoreSettings_" + platform.ToString() + ".cfg", FileMode.Open); coreSettings = xmls.Deserialize(fs) as FSCoreSettings; fs.Close(); } else { coreSettings = new FSCoreSettings(); } //FSCategorySettings if(File.Exists(path + "/FSCategorySettings.cfg")) { xmls = new XmlSerializer(typeof(FSCategorySettings)); fs = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open); categorySettings = xmls.Deserialize(fs) as FSCategorySettings; fs.Close(); } else { categorySettings = new FSCategorySettings(); } lastPlatform = platform; }
public virtual void OnEnable() { target0 = target as FSShapeComponent; FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }