Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefab.instantiate() seems to not use the same material instance as the prefab. #149

justStand opened this issue Aug 26, 2018 · 0 comments


None yet
1 participant
Copy link

commented Aug 26, 2018

I've created a simple computecolor shader that will change the color depending on the x position of the camera.

I created a prefab with a material that has this shader on it.

The shader only responds to the camera position if the prefab was added to the scene using the scene editor, or the prefab was added directly to the scene (not instantiated.)
Prefab prefab = Content.Load<Prefab>("TestPrefab"); SceneSystem.SceneInstance.RootScene.Entities.AddRange(prefab.Entities);

If I use prefab.instantiate and add the objects that this creates to the scene, they don't respond to the camera position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.