About package architecture #2
Replies: 9 comments
-
Hi, thanks for trying out the package :) The basis of the package is GenericUnityObjects. [Serializable]
public class PlainObject<T> { }
public class TestBehaviour : MonoBehaviour
{
[SerializeField] private PlainObject<int> _plainObject;
} However, we are still missing this feature for classes derived from public class GenericBehaviour<T> { }
// You can't add GenericBehaviour<int> to a game object directly.
public class GenericBehaviourInt : GenericBehaviour<int> { } GenericUnityObjects package eliminates the need for implementing concrete classes manually by generating them for you. The generation of a concrete class happens when you use a set of generic arguments for the first time. For example, when you add the Now, other packages based on Ryan Hipple's ScriptableObject talk have a number of concrete classes derived from With GenericScriptableArchitecture, you can use as many types as you want without writing a line of code - in the end, that's what generics are for! The project needs to recompile only once when you use the type for the first time. Besides, the type names will be more readable in the inspector and code editor: You can also expand the plugin more easily as there is only one Hopefully that answers your question :) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Not only the .meta files change when your colleague pulls the changes. As I can see, .dll files are marked as changed too which means they were regenerated. Could it be that you pushed the generated .dll files but didn't push changes to Assets\Plugins\GenericUnityObjects\EditorResources\SOGenerationDatabase.asset in the same commit? Thinking of it, it's easy to mess up. A scriptable object file does not change until you press Ctrl+S in the Unity project, so it's easy to create a commit where the generated .dll files will be present, but SOGenerationDatabase won't. I will fix it soon, thanks for pointing this out |
Beta Was this translation helpful? Give feedback.
-
Please upgrade to 1.1.8 and let me know should you still encounter this issue |
Beta Was this translation helpful? Give feedback.
-
I'll check it out tomorrow morning at the office, for sure. Please let me try out and I'll be back here to report. |
Beta Was this translation helpful? Give feedback.
-
First update: regeneration is not done anymore after upload database assets. Yep, you were right! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay, I never received an email regarding your replies for some reason. Sure, upgrade to the latest version, no need to remain on the previous one to test other bugs. The MissingMethodException is a known bug I fixed before, so it shouldn't reproduce in 1.1.8 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Really astonishing package you did. 😄
We've tried to integrate the way you implemented ScriptObjs' famous Unity 2017 talk into our workflow. We failed at first 'cause we were at Unity 2019 — didn't properly read Unity 2020 requirement, my bad. Then we upgraded to Unity 2020 LTS and I'm right now integrating your package.
The thing I don't really figure out is why the package take so long any new type of variable/event/constant/reference and so forth is declared in inspector, neither why a new dll is created into Plugins-based hierarchy instead of use code in your package. May I'm missing something about how you architecturize the package?
Thanks so much!
Beta Was this translation helpful? Give feedback.
All reactions