Binding MonoBehaviour
MonoBehaviour is the base class from which every Unity script derives.When you use C#, you must explicitly derive from MonoBehaviour.
In AR MOD development, we cannot drag and drop Monobehaviour into the game object.
drag and drop Monobehaviour into the game object
Even if the traditional drag-and-drop is not supported, we provide another way to bind MonoBehaviour. We call it Mono Binder.
Mono Binder

How to use it

  1. 1.
    Add MonoBinder to your own game object
  2. 2.
    Typing your script namespace and class name
  3. 3.
    Click the Binding button
Well done! You have mastered how to use monobinder. You may not understand the panel parameters. Next, we will introduce the function and usage of each parameter of the panel in detail.
Mono Binder
Id
Name
Description
1
Script List
MonoBehaviour list
2
Element
MonoBehaviour binding configure.
9
Binding
Auto binding fields
10
Refresh
Refresh bound fields and remove uselessfields
Id
Name
Description
3
ClassNamespace
Your script namespace
4
ClassName
Your script class name
5
ActivateAfterInitialization
Automatically activate after initialization
6
AutoPaddingData
Automatically fill in data for all fields
7
Constructor
Whether to use the constructor
8
Fields
All public fields in the script
Fields
Name
Description
FieldName
The name of the field in the script
Value
The value of the field in the script
GameObject
Allow you drag-and-drop gameobjec for it
FieldType
The type of the field in the script

Value or GameObject

If the Field Type is not GameObject or Unity Component, here is the value of the Field
  • A number or a string, write it directly
  • A boolean, write true or false
  • An AR Experience resource, enter the full path of the resource or a short path that can be detected by PackageTools
  • When the Field Type is GameObject or Unity Component, nothing written in Value here will have no effect
  • If the Field Type is GameObject or Unity Component, simply drag and drop the GameObject.
Last modified 4mo ago
Copy link