Skip to main content
added 23 characters in body
Source Link

I am working on large projects that have Common asset in separate git repository. How we setup the projects in brief is this:

// # Main unity project 
/ext/Common/ext/Common # Common source unity project (checked in using either git subtree or submodule)

Common contains Assets folder as any unity project would

/ext/Common/Assets/ext/Common/Assets is symbolic linked to /Assets/Externals/Common/Assets/Externals/Common

We have git post-checkout hook written that checks if /Assets/Externals//Assets/Externals/ link exists for each directory under /ext//ext/ that contains Assets subfolder.

This works okyish but there are some dilemmas: 
A) We use different windows versions and OSX in our team. We need cross platform way to write the post-checkout script. Hence dependency to python. 
B) Git post-checkout hook does not trigger in after git pull which would be optimal.
C) Git post-checkout hook need to be written in the repository only way I could get this happen was to push is in some location in the repository and modify git config git-hook path.

I have considered replacing the git post-checkout hook with Unity AssetPostprocess::OnPreprocessAsset. However the caveat with this is that it wont trigger on fresh checkout as project scripts have not compiled and as there are scripts missing in Unity as the symbolic links have not been formed... Not a good thing.

What alternatives can you think of to over come A), B), C) problems? Are there better git hooks? CanDo you somehave idea how avoid this mess with multiple projects?

I am working on large projects that have Common asset in separate git repository. How we setup the projects in brief is this:

/ # Main unity project /ext/Common # Common source unity project (checked in using either git subtree or submodule)

Common contains Assets folder as any unity project would

/ext/Common/Assets is symbolic linked to /Assets/Externals/Common

We have git post-checkout hook written that checks if /Assets/Externals/ link exists for each directory under /ext/ that contains Assets subfolder.

This works okyish but there are some dilemmas: A) We use different windows versions and OSX in our team. We need cross platform way to write the post-checkout script. Hence dependency to python. B) Git post-checkout hook does not trigger in after git pull which would be optimal C) Git post-checkout hook need to be written in the repository only way I could get this happen was to push is in some location in the repository and modify git config git-hook path.

I have considered replacing the git post-checkout hook with Unity AssetPostprocess::OnPreprocessAsset. However the caveat with this is that it wont trigger on fresh checkout as project scripts have not compiled and as there are scripts missing in Unity as the symbolic links have not been formed... Not a good thing.

What alternatives can you think of to over come A), B), C) problems? Are there better git hooks? Can you some how avoid this mess with multiple projects?

I am working on large projects that have Common asset in separate git repository. How we setup the projects in brief is this:

/ # Main unity project 
/ext/Common # Common source unity project (checked in using either git subtree or submodule)

Common contains Assets folder as any unity project would

/ext/Common/Assets is symbolic linked to /Assets/Externals/Common

We have git post-checkout hook written that checks if /Assets/Externals/ link exists for each directory under /ext/ that contains Assets subfolder.

This works okyish but there are some dilemmas: 
A) We use different windows versions and OSX in our team. We need cross platform way to write the post-checkout script. Hence dependency to python. 
B) Git post-checkout hook does not trigger in after git pull which would be optimal.
C) Git post-checkout hook need to be written in the repository only way I could get this happen was to push is in some location in the repository and modify git config git-hook path.

I have considered replacing the git post-checkout hook with Unity AssetPostprocess::OnPreprocessAsset. However the caveat with this is that it wont trigger on fresh checkout as project scripts have not compiled and as there are scripts missing in Unity as the symbolic links have not been formed... Not a good thing.

What alternatives can you think of to over come A), B), C) problems? Are there better git hooks? Do you have idea how avoid this mess with multiple projects?

Source Link

Unity & git: multiproject structure and symbolic links, better solutions?

I am working on large projects that have Common asset in separate git repository. How we setup the projects in brief is this:

/ # Main unity project /ext/Common # Common source unity project (checked in using either git subtree or submodule)

Common contains Assets folder as any unity project would

/ext/Common/Assets is symbolic linked to /Assets/Externals/Common

We have git post-checkout hook written that checks if /Assets/Externals/ link exists for each directory under /ext/ that contains Assets subfolder.

This works okyish but there are some dilemmas: A) We use different windows versions and OSX in our team. We need cross platform way to write the post-checkout script. Hence dependency to python. B) Git post-checkout hook does not trigger in after git pull which would be optimal C) Git post-checkout hook need to be written in the repository only way I could get this happen was to push is in some location in the repository and modify git config git-hook path.

I have considered replacing the git post-checkout hook with Unity AssetPostprocess::OnPreprocessAsset. However the caveat with this is that it wont trigger on fresh checkout as project scripts have not compiled and as there are scripts missing in Unity as the symbolic links have not been formed... Not a good thing.

What alternatives can you think of to over come A), B), C) problems? Are there better git hooks? Can you some how avoid this mess with multiple projects?