-I downloaded a package called “ScriptableObject_Architecture” package from the unity asset store.
-I see that it has an assembly reference which means it compiles all the scripts in that folder together.
-I am using Starter Assets - ThirdPerson from Unity from the package manager which uses a namespace in its code. (this asset pack doesn’t come with an assembly reference)
-I added some code to the movement script that references the SO arch (ill use this to reference “ScriptableObject_Architecture”) but it wont allow it. I tried using the “using” statement at the top of the script but it didn’t matter.
Basically i just want to know how to use the SO arch assembly reference with anything as my project grows. Can anyone help explain how i can get them to play nice with each other?
I am using a completely blank and new project.
You’ll just need to make an assembly definition asset for the starter assets, and reference whatever other assemblies it needs to fulfil its dependencies. For example, it’s dependant on the Input System, so you’ll need to reference its assembly too.
@spiney199 Thanks for responding!
So i added one to the top folder of the third person asset folder. Then I had it reference the SO Arch assembly reference asset.
now im getting 800+ of these errors (which are all under the ScriptableObject-Architecture namespace in the code)
Assets\SO Architecture\Events\Listeners\BaseGameEventListener.cs(71,10): error CS0246: The type or namespace name ‘SerializeFieldAttribute’ could not be found (are you missing a using directive or an assembly reference?)
The assembly definition should probably be in the Starter Assets folder. As mentioned it will need to reference all required assemblies. There may be compilation errors until you fulfill all the dependencies.
Though you seemed to have checked No Engine References in the SO Architecture assembly definition???
I think i got it working? i still get an error but i think it might be something from the SO Arch package?
Assets\SO Architecture\Events\Listeners\BaseGameEventListener.cs(259,67): error CS0104: ‘Object’ is an ambiguous reference between ‘UnityEngine.Object’ and ‘object’
Assets\SO Architecture\Events\Listeners\BaseGameEventListener.cs(268,42): error CS0104: ‘Object’ is an ambiguous reference between ‘UnityEngine.Object’ and ‘object’
P.S. i started just checking boxes hoping it would just randomly work. Like i said i dont know much about assemblies. I know a little but not enough obviously
Thanks, turns out i needed to use UnityEngine.Object in the code where Object was being used. which was a perameter for some functions. I still got errors after that. but i think i resolved them. SO Arch also has an editor assembly reference. So i fixed that by referencing some stuff. But I also needed the input system referenced. To be honest I wasn’t sure where to find that but i was able to open the search function when adding the references in the assembly reference.
So its all good now thank you for the help.
When using the “using” statement of another package or assembly reference in another script, im referencing some classes and variables from it but they dont change color like it does on the unity words like GameObject.
Vector2GameEvent doesnt change colors. Not sure if you know off the top of your head. I can troubleshoot this myself no worries but wasn’t sure if you’ve dealt with it before.
Also do you know a lot of people who use Assembly references regularly in their projects?
I know its good practice since it can speed up compile times and such. But maybe a poll should be made haha im curious to see how many indie devs or company use them when using unity