- Home /
Question by
Liruss · Nov 13, 2018 at 02:06 PM ·
runtime-error
type is not a supported string value UnityEditor.SerializedProperty:set_stringValue(String)
hi guys, I'm trying to change the ProjectSetting.asset file permanently. Now I'm using this code to read ProjectSetting.asset file
object[] loadedObjects;
loadedObjects = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset");
SerializedObject projectSettings = new SerializedObject(loadedObjects[0]);
SerializedProperty symbols = projectSettings.FindProperty("scriptingDefineSymbols");
string value = symbols.stringValue;
symbols.stringValue = "test";
projectSettings.ApplyModifiedProperties();
But there's an error at "string value = symbols.stringValue;"
"type is not a supported string value UnityEditor.SerializedProperty:set_stringValue(String)" any idea how to fix this ?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612182047im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Reading Xml files, InvalidCastException 0 Answers
When go.SetActive(false) is used, permanently sets GO to inactive??? 0 Answers
Android Build crashes directly after launching the game. 0 Answers
Start FPS player off with no weapon 2 Answers
RunTime Error in Unity when I'm using a function from a C++ Dll 0 Answers