Same script doesnt work in other project

I have 2 projects. The “original” project and the “combined” project. The “combined” project is the “original” project plus assets of another project.

In “original” project i have a scene called calibcubus. So i also have it in the “combined” project. When i run the scene calibcubus in “original” project it runs fine, however when i run it in “combined” project it doesnt and i get this error:
NullReferenceException: Object reference not set to an instance of an object

I dont get this error cause the scenes are completely simular. Anybody have some advice how to fix this?

2 Answers

2

This usually happens to me when some value is null, probably you missed to assign some variable?

True. The gameobject.find function gave a null in the combined project and not in the original. This is weird cause everything is the same so also the names.

But i got the solution. The scripts producing the error need to be removed from gameobject and reattached afterwards.