I keep getting this loss of reference on Button Event List, or Event Trigger event lists

“Could not find method invokeList on object Scenes”

I have a button or Event Trigger which calls a function from an Object called “InvokeList” but It keeps losing reference to the object

Original Post on Discord

by user 210863611487322122

This also happens with array when serialized

by user 210863611487322122

Hi can you share some screenshots or code? Im not sure what you refer to

@marwie1 :cactus: This is what I mean

by user 210863611487322122

The javascript method name should be onClick

@marwie1 :cactus: Thanks above fixed that issue, please 1 more

by user 210863611487322122

Is a serialization like this stored? as List seems to be empty when browser initializes, but if I use getcomponent it works, I want to know If I can see the refs in inspector without using get component

by user 210863611487322122

SceneObject is a component of yours? → serializable(SceneObject) is probably what you need
Are you using Typescript → C# component gen? then you can define the generated type by adding //@type SceneObject[]

When every I do this it shows this error in browser @marwie1 :cactus:

by user 210863611487322122

Well where to you define SceneObject ?

and what is it ?

@marwie1 :cactus: please I don’t understand this

by user 210863611487322122

@marwie1 :cactus: not sure what you mean by “Define” in this case

  1. Are Scene Objects (Script that extends from monobehaviour)
  2. Scene controller is used control
    on the scene objects
    ech.PNG

by user 210863611487322122

by define I mean: the code you show here is typescript. so somewhere in your typescript files you have something like:

export class SceneObject extends Behaviour

I assume?
I need more information to help you

Yes

by user 210863611487322122

try replacing serializable(SceneObject) with serializable(Behaviour) - the error is probably because you have a circular import with your types (SceneObject imports SceneController and vice versa)

This works, thanks alot @marwie1 :cactus:

by user 210863611487322122