Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hmm, so we added "<GetComponent>", added "using UnitiyEngine.UI" (also tried without it), and well the script still crashes Unity. Gray areas for us right now would be :

-Must the script be attached to the RawImage or to something else ?

-We had to change m_VirtualScreen to "Sprite/Default" in order to toggle "Pixel snap". Could that be an issue ?

-Before adding the second camera, no change is visible. Do you have any idea what could cause this problem ?

Right now, we don't really know what more we could do, so if you have any ideas, let us know :D

I've zipped up the project file for you to take a look at, and see if there's any differences between yours and mine.


http://sabercathost.com/G3j/VirtualCameraTutorial....


Yeah the scaling script needs to go on the RawImage object. But I'm not sure why it would be crashing rather than just not working/compiling.

We tried to match as many settings as we could, but couldn't make it work. Here is a version of the project including the script and some assets, maybe you can see something that's wrong. Until then, I will work without it, and try again if I have any more time.


Thanks for your help anyway if we can't find a solution. It still helped me understand a few things about Unity :D

Getting a lot of errors trying to download and open that when google drive does it's thing.

Try zipping the entire project and just sharing that. I'll take a look and try to fix it.

Hmmm, that's weird. Try This link maybe ?

Thanks, that works fine.

So, good news is the project works just fine for me. So it may be an issue with your installation of unity or your machine. Bad news is that means I have absolutely no idea what's wrong :\ sorry


Ok then, I'll look into it and try to reinstall Unity. What is weird though is that we had the problem on both a Windows PC and a Mac laptop. Maybe it has something to do with some weird setting we didn't think of checking. Anyway, thanks a lot for your help ! we'll work on that, and keep you updated if we find the source to the problem (in case someone else ever gets stuck in this situation).

It's possible yeah. Odd suggestion but, try exporting the whole project as a package, and importing it into a fresh project. I've had the occasional issue that was solved that way.