ProwlEngine / Prowl

An Open Source C# 3D Game Engine under MIT license, inspired by Unity and featuring a complete editor and built on Silk.NET
MIT License
328 stars 27 forks source link

[Cleanup] Merge RegisterAllType methods into 1 system #108

Closed michaelsakharov closed 4 months ago

michaelsakharov commented 5 months ago

We have a few static methods like RegisterAllMenus() and stuff that loop over all assemblies and register Attributes found in a dictionary. They also have a Clear() since they get cleared and re-registered on scripts reloading since they can contain said attributes.

It would be nice to have some singular source that handles finding attribute types

Maybe like AttributeHolder.Clear(); AttributeHolder.GetAll() AttributeHolder.GetAllOnClass() AttributeHolder.GetAllOnField()

Ones like GetAllOnField can cache the attributes on the field.

Not 100% sure how this would work, just thought about it as i just added yet another RegisterAll attributes method for the new PropertyDrawer stuff im working on

michaelsakharov commented 4 months ago

Added OnAssemblyLoad and OnAssemblyUnload Attributes

PaperPrototype commented 4 months ago

0.o noice