-
Notifications
You must be signed in to change notification settings - Fork 40
Feature/add references #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add references #99
Conversation
Conditionally define SOC_ADDRESSABLES depending on whether Addressables is installed
Empty string has been allowed in previous versions. By forcing a namespace when other items have no namespace breaks the references conversion
|
Awesome! I will get the branch and do some local tests with it, but overall looks really good! |
brunomikoski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions and small code code format issues
5ec3c84 to
bfceda8
Compare
6f87aaa to
80964bd
Compare
80964bd to
f759b52
Compare
|
Thank you for the review, glad you liked it! |
Hey as discussed, here are the proposed changes to add references to collections.


Essentially it is now possible to convert all items in a collection to references. These references are stored inside Addressables.
It is then possible to add references or items to the collection by using the add (plus) button:
For the sake of simplicity, I'll provide examples using the names of the
Weaponscollection shown in the screenshots.The conversion process entails several steps:
WeaponBase).WeaponReference) as inherits the new item base class (WeaponBase).ScriptableObjectCollectionItem) of the item class (WeaponBase) for the new base class (WeaponBase). This step does not fully regenerate the class, it just finds and replaces the base class type.WeaponCollection) swapping the type argument of the generic collection class (previouslyWeapon) for the new base class (WeaponBase).Once the process is complete, developers can use the Load util method provided for each item on the static class (example
LoadAK47()) to load the item.Some advantages of the reference system:
Additionally, this PR includes fixes to the core system that I've stumbled upon testing the references feature.
Keep in mind this is the first iteration and more improvements are possible in the horizon. (For example, better editor UI to manipulate references in the collection)
Also as you asked, I've updated the wiki. But this update is only in my fork (Not possible to create a PR to the wiki repo nor I have permissions to push commits to it)