Quantcast
Channel: Answers for "Change material with EditorScript"
Browsing all 6 articles
Browse latest View live

Answer by jahroy

Sorry, I assumed you were using C# because of the unfamiliar code I saw as the second parameter of your call to LoadAssetPath(). When I use LoadAssetAtPath() I use it like this: var newMat =...

View Article



Answer by gergerr

*Removed Spam* -Peter G

View Article

Answer by aymeric

It works now! i used the code like this: Make sure you begin with "Assets" in the path. @CustomEditor (scriptname) class NewBehaviourScript extends Editor{ function OnInspectorGUI() { var thePath =...

View Article

Answer by jahroy

Sorry, I assumed you were using C# because of the unfamiliar code I saw as the second parameter of your call to LoadAssetPath(). When I use LoadAssetAtPath() I use it like this: var newMat =...

View Article

Answer by aymeric

It works now! i used the code like this: Make sure you begin with "Assets" in the path. @CustomEditor (scriptname) class NewBehaviourScript extends Editor{ function OnInspectorGUI() { var thePath =...

View Article


Answer by astracat111

Do you use? Material SRm = (Material)AssetDatabase.LoadAssetAtPath("Assets/MyMaterial.mat", typeof(Material));

View Article
Browsing all 6 articles
Browse latest View live




Latest Images