Hi.
I made a javascript ("DetailMassPlace") to autogenerate grass detail on a terrain. I need to make another script ("DetailMassPlaceEditor") to create a button in the inspector to apply the grass. My editor-script looks like this:
@CustomEditor(DetailMassPlace)
public class DetailMassPlaceEditor extends Editor {
override function OnInspectorGUI () {
DrawDefaultInspector();
if(GUILayout.Button("Apply")) {
updateLayer();
}
}
}
The updateLayer() function is a function inside "DetailMassPlace".
How do i call that function from the other script "DetailMassPlaceEditor"?
↧