C
C#3mo 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
goatedOP3mo ago
Angius
Angius3mo 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
goatedOP3mo ago
It's mostly just for initialization for inspector
Buddy
Buddy3mo 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
Angius3mo ago
Still ditch the ArrayList
Want results from more Discord servers?
Add your server