Skip to content

Help with netcode bullet prefab spawning #2753

Closed
@Mid-D-Man

Description

@Mid-D-Man

Afternoon, so I have been struggling with this question quite a bit now (spawning bullet prefabs and syncing tire materials,trails,values over the network) , but the way I have been trying to do it is not as simple as just spawning the bullets and synchronising them how do I explain this.
I have a bullet or rather a projectile blue print and 3 list of projectileconfig scriptable objects (which determine the projectiles data such as the damage,speed,sprite, etc.t.c) now everything works perfectly on the host and is even syncing to other clients as well but for some reason on the client when ever the bullet is spawned it immediately gets despawned and then gives me an error something amongst the line of only server can despawn networkobjects, yes I used to call a despawn function on the projectiles when they collide with something I have tried to make it a server rpc or make it so only the server calls it I even removed the whole despwing at one point but alas the issue still persist I will provide some of the scripts that work with the projectile script an if anyone can help point out what is wrong with the scripts whould be much appreciated cause I have tried so many approaches to solving this but for the last few weeks my efforts have been In vain.
Down below are the scripts I use and note I am using netcode version 1.1.0 and I cannot upgrade any higher then that cause I am limited by the tech I use.

### Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:supportQuestions or other support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions