NetCode 0.4.0 Dont get to spawn a visible prefab

Hello, I’m having a little problem that I’m looking to solve
I have been following step by step the documentation from here
https://docs.unity3d.com/Packages/com.unity.netcode@0.4/manual/getting-started.html

And in the 0.3.0 I got the prefab moving and visible, now I can’t, and seems that something related to the spawn has changed? right now I don’t get the guide working, the prefabs spawn and even works, but are not vsible, I’m using Hybrid renderer v2, Unity version 2020.2.07b

can someone give me a helping hand on this, please?

Material on the rendered object must have “GPU instancing” checked.
Your object must be a Ghost in order for it to be replicated to the clients.
Your object must be Predicted or Owner Predicted to safely run prediction logic on it ( in a system in the GhostPredictionSystemGroup ).
Hybrid renderer V2 does not support standard render pipeline. You must be using either URP or HDRP.

I have GPU Instancing Checked
My object is a ghost
The ghost is predicted
and im using URP

The ghost works, and spawn, but it is just invisible

Is your ghost collection in a subscene?
Is the console printing "
Hybrid Renderer V2 active, MaterialProperty component type count X / Y
" per the documentation here DOTS Hybrid Renderer | Hybrid Renderer | 0.8.0-preview.19
Is the Hybrid Renderer package actually installed?
Are you running your multiplayer client as Server and Client?
Is your ghost pre-spawned in the world by being a part of your scene or instantiated at runtime?


This is my ghost


This is the Subscene with the floor and the ghost collection
and as you see the ghost authoring is referenced in the collection

In the debug appears that is connecting properly and the worlds have their respective TestCube entities, and also they work, they are using a system to respond to the WASD input


Here is where i spawn it

abd it worked for me on the 0.3.0 version

i just followed the steps and it doesnt sees

yes to everything

and the ghost is spawned at runtime, since it can not be pre spawned in scene as far as i know

Also the platform renders
the problem is on rendering the runtime generated ghost

You can pre-spawn but that’s a different conversation. Try removing the BoxCollider as that is a component of legacy Unity Physics and may be causing odd issues. If you want to have collision you’ll need to install Unity.Physics and use a PhysicsShape/PhysicsBody.

thanks for your help, seems that has been a unity bug or something, just restarting unity solved the issue
Thanks a lot for your time!

1 Like