public void CreateVisualDamage() { if (visualDamage_ != null) { Destroy(visualDamage_.gameObject); } GameObject damage = visualDamagePrefab_; if (damage == null) { damage = Resources.Load <GameObject>("VRC_PlayerVisualDamage"); } if (damage != null) { GameObject visualDamageObject = Instantiate(damage, playerController.GetCameraProxyTransform()); float offset = 0; visualDamage_ = visualDamageObject.GetComponent <VRC_VisualDamage>(); if (visualDamage_ != null) { visualDamage_.SetDamagePercent(0); offset = visualDamage_.offset; } visualDamageObject.transform.localScale = new Vector3(40, 40, 40); visualDamageObject.transform.localPosition = new Vector3(0, 0, offset); } }