alelievr / Mixture

Mixture is a powerful node-based tool crafted in unity to generate all kinds of textures in realtime
https://trello.com/b/2JiH2Vsp/mixture
MIT License
1.22k stars 129 forks source link

[Enhance] Restructure assemblies #56

Closed Looooong closed 2 years ago

Looooong commented 2 years ago

I see that Mixture editor assembly use the name Unity.ShaderGraph.GraphicsTests to get around the issue of using internal type from Unity.ShaderGraph.Editor assembly.

This PR presents another way around this issue. I made the entire Editor/CustomTextureShaderGraph directory belongs to the Unity.ShaderGraph.Editor assembly using Assembly Reference file. Some code from Editor/Utils/MixtureCallbacks has to be transfered to this folder as well. Everything outside CustomTextureShaderGraph folder doesn't reference internal ShaderGraph types and thus remains untouched.

Some other small modification includes using GUIDs for assembly references, renaming assembly to a more consistent name.

peeweek commented 2 years ago

I think that using an asmref / connector seems pretty much a way to go (instead of impersonating the test assembly). I double on that change.

However i saw strange changes in the way packages are referenced (especially a git reference)

Looooong commented 2 years ago

@peeweek

However i saw strange changes in the way packages are referenced (especially a git reference)

I don't quite get it. Can you elaborate more about it?

peeweek commented 2 years ago

However i saw strange changes in the way packages are referenced (especially a git reference) I don't quite get it. Can you elaborate more about it?

Oops, sorry, I forgot to remove this comment, I was referring to the git adress in the packages-lock.json and mistook it for a reference in manifest.json

however, a good thing to know about git references for packages is that it exepcts users have a CLI git installed, especially on windows which is not the case (some users often use fork, which bundles its own git CLI and do not exposed it at OS level). In the case of not having this CLI, the project cannot load.

Looooong commented 2 years ago

however, a good thing to know about git references for packages is that it exepcts users have a CLI git installed, especially on windows which is not the case (some users often use fork, which bundles its own git CLI and do not exposed it at OS level). In the case of not having this CLI, the project cannot load.

That's a good point. I will probably switch to the NodeGraphProcessor package on the registry.