Hi,
I have a project which is divided into Oculus Rift (windows), Oculus Go (android) and iPad(iOS). They are basically the same projects except for few script changes. Now if I want to add a model to the scene, I have to add it to three different projects which takes alot of time. Is there a way that I can just add it to one Project (maybe windows) and then this will be reflected in other projects as well? Is there a simpler solution?
Well, if you already have them set up as three separate Projects, that’s that. In Unity you can set up built targets for separate platforms, and you should be able to determine in your script which platform you are compiling for or running on.
It may get a little difficult if you are supporting different SDK per platform - Rift, Go, and no-VR might be too far apart, but you may be able to consolidate on OpenVR.
I’d better setup this as repository branches, but if you made it different projects here are some ways to go. Create another repository for binary assets and add is as subrepo to all three projects. Update one repo, propagate changes to all of them. This even can be done via script, no hand work at all. And if you are not using this, you may try to setup hard disk soft or hard link to shared folder with models. Another option is to create separate project for assets, build asset bundles and load your models and other assets from bundles instead of keeping them in three projects.
Use just 1 project and platform specific defines to separate the “few script changes” between the various platforms.
2 Likes