Skip to content

samples restructuring#9

Open
Thendon wants to merge 1 commit into
bartofzo:mainfrom
Thendon:samplefix
Open

samples restructuring#9
Thendon wants to merge 1 commit into
bartofzo:mainfrom
Thendon:samplefix

Conversation

@Thendon

@Thendon Thendon commented Nov 10, 2024

Copy link
Copy Markdown

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

Thendon commented Nov 10, 2024

Copy link
Copy Markdown
Author

Samples will be importable in the Package Manager menu:
image

@bartofzo

Copy link
Copy Markdown
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

Thendon commented Nov 16, 2024

Copy link
Copy Markdown
Author

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

Ph0t0nX commented Nov 17, 2024

Copy link
Copy Markdown

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