i dont know much about reflection and im having problems
i would appreciate it if someone could help
the pic2 is what i want to achieve
5 Replies
Using reflections in code that needs to be performant, like in games, is not a good idea
Neither is using
ArrayList
Why do you think you need reflections?
What do you want to do?It's mostly just for initialization for inspector
Do not use reflection in Unity
at least at runtime
https://docs.unity3d.com/6000.0/Documentation/Manual/dotnet-reflection-overhead.html
Mono and IL2CPP internally cache all C# reflection (System.Reflection
) objects and by design, Unity doesn’t garbage collect them. The result of this behavior is that the garbage collector continuously scans the cached C# reflection objects during the lifetime of your application, which causes unnecessary and potentially significant garbage collector overhead.
in the editor it's fineStill ditch the
ArrayList