-
Notifications
You must be signed in to change notification settings - Fork 0
Configure button
Koretsky Konstantin edited this page Oct 21, 2021
·
3 revisions
Plugins system uses ScriptableObjects behaviour. You need to create new one that will control all your custom marking menu actions.
There are some restrictions:
- Class has to inherit from ScriptableObject to be able to use its functionality
- Class should have public methods to be able to get hooked to UnityEvent via the Editor
Using the CreateAssetMenu attribute helps to create ScriptableObject using your class.
[CreateAssetMenu(fileName = "Action", menuName = "ScriptableObjects/CustomActions", order = 1)]
This will create an “Action” ScriptableObject in your currently opened folder.
Navigate back to MarkingMenuModelContainer. Choose your created new button in list.
- Add UnityEvent, then drag & drop your created ScriptableObject on it.
- Select method which will do something
- Use marking menu on scene view and choose your button.


