Skip to content
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

samples restructuring #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

samples restructuring #9

wants to merge 1 commit into from

Conversation

Thendon
Copy link

@Thendon Thendon commented Nov 10, 2024

The samples contain conflicting Asset UIDs for some projects which can not be fixed by the Unity Editor automatically when importing Packages with git. The problem can by fixed by restructuring the files according to this documentation: https://docs.unity3d.com/6000.0/Documentation/Manual/cus-samples.html

@Thendon
Copy link
Author

Thendon commented Nov 10, 2024

Samples will be importable in the Package Manager menu:
image

@bartofzo
Copy link
Owner

Sounds good, but when I open the project the Samples~ folder is completely invisible inside of the Unity editor. How do you edit the samples should the need arise?

@Thendon
Copy link
Author

Thendon commented Nov 16, 2024

Yea I later also figured that this setup may be ideal for my situation but not so much if you don't use the package manager like I am. When using my pull request the workflow of changing sample scripts would be something like:

  • Importing those samples from the package manager menu. Now you have a copy of everything in your main projects /Asset folder which shouldn't be tracked by git
  • Change those sample scripts
  • Copy all changed files back into the special Samples~ folder
    I can imagine that this would become kind of annoying and prone to mistakes, maybe there is a better way which I don't know of.

@Ph0t0nX
Copy link

Ph0t0nX commented Nov 17, 2024

I use a standard dummy project and then make a symbolic or hard link to the package content and the ~Samples folder (renamed without the ~ in the link process). It yells at you when starting up but other than that it works great and I can easily make changes to the package + samples and push them to the relevant branch when ready. No need for duplicate copies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants