UnityEvent issue with multiple copies of same script.

Issue #294 resolved
Former user created an issue

I'm getting a weird issue with serialized UnityEvents when two (or more) instances of the same scripts are on the same GameObject. The "+" and "-" controls in the inspector don't work for the first instance of the script, but on the second (or last) instance, the controls work, but actually create new handlers on ALL of the instances of the script, instead of just the one.

Tested in a completely new project. Imported Odin. Created the following script: using UnityEngine; using UnityEngine.Events;

public class Test : MonoBehaviour { [SerializeField] UnityEvent test; }

created an empty in the scene and added two instances of said script to it.

Comments (6)

  1. Log in to comment