System.Collections.IEnumerator CreateDecal() { yield return(null); if (material != null) { _material = InstanceMaterial(material); UpdateMaterialColor(_material); } if (_material != null) { while (_decal == null) { var clworld = GameManager.instance.clientWorld; if (clworld != null) { if (Client.Actors.ClientPlayerController.localPlayer != null) { _decal = clworld.NewDecal(0f, DecalUpdate, transform.position, transform.localScale, transform.rotation, _material, true); break; } } yield return(null); } } }
public void RemoveDecal(Decal d) { if (_decals != null) { _decals.Remove(d); } if (_decalRenderer != null) { _decalRenderer.RemoveDecal(d.drd); if (d.visible) { _decalsRemoved = true; } } }
void DecalUpdate(Client.Decal d, float dt) { UpdateDecal(true); }