C
C#4mo ago
goated

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
No description
No description
5 Replies
goated
goatedOP4mo ago
Angius
Angius4mo ago
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?
goated
goatedOP4mo ago
It's mostly just for initialization for inspector
Buddy
Buddy4mo ago
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 fine
Angius
Angius4mo ago
Still ditch the ArrayList
Want results from more Discord servers?
Add your server