[1.20] Dynamic Mesh Combiner
  • Quick Start
  • Components
    • Usage Tips
    • Combiner
      • MC Chunk Combiner
      • MC Mesh Combiner
    • MC Combinable
      • MC LOD Combinable
    • MC Extractor
    • Bake Materials
      • NoTextureMaterialBaker
      • TextureBaker
    • Profile
    • Compatible Assets
      • Photon
      • Outlines & Highlights
Powered by GitBook
On this page
  1. Components
  2. Compatible Assets

Photon

To safety remove dynamic objects it's recommended to use LazyDestroy helper script. You can create new extension to make removal easier. Here is an example for Fusion:

public static class NetworkRunnerExtension {
	public static void SafeDespawn(this NetworkRunner runner, NetworkObject obj) {
		obj.gameObject.LazyDestroy(() => runner.Despawn(obj));
	}
}

Then you can call it like that:

Runner.SafeDespawn(Object);

That code will hide object, so combinables will be removed from baked mesh, and then call runner.Despawn(obj)

PreviousCompatible AssetsNextOutlines & Highlights