Like the title implies, i cannot assign a MonoBehaviour to the Array in the inspector window for AddMonoBehavioursModifiersType script. I get an error message saying "Selected object is not a MonoBehaviour type!".
This should be straight forward, as i've seen others do it without problems (youtube tutorial by mapbox). What is the cause?
- Unity version: 2020.3.1f1 LTS
- Scripting Runtime Version: .NET 2.0
- Scripting Backend: Mono
- Api Compatibility Level: .NET 2.0
- Mapbox SDK version: 2.1.1
- The platform you're building to: PC, Mac and Linux standalone
- A description of what you're trying to do: Assign MonoBehaviour script to each rendered gameobject of Map Prefab
- Steps to recreate the bug if appropriate:
- Create a C# script (right click editor > create > C# Script)
- create a Mapbox MonoBehaviour Modifier (right click editor > create > mapbox > modifiers > add MonoBehaviours Modifier).
- Click
+
icon in inspector window for newly created Mapbox Monobehaviour Modifier and assign the newly created C# Script to the Array of name types. Here i get the error message:
Selected object is not a MonoBehaviour type!
- Links to your logs are also helpful: No logs.
Edit: Solution: After restarting the computer and Unity, it worked by itself.