private void Update() { float3x4 worldToLocal = MPipeline.MathLib.GetWorldToLocal(bounding); float3 localPos = mul(worldToLocal, float4(characterCamera.position, 1)); if (abs(localPos.x) < 0.5f && abs(localPos.y) < 0.5f && abs(localPos.z) < 0.5f) { selfText.enabled = true; selfText.text = signStr; if (Input.GetKeyDown(KeyCode.E)) { if (allowedUseThis) { triEvent.ExecuteTrigger(); stopSign.enabled = false; selfText.enabled = false; Destroy(this); } else { stop = 2; stopSign.enabled = true; } } } else { selfText.enabled = false; } if (stop > 0) { stop -= Time.deltaTime; if (stop <= 0) { stopSign.enabled = false; } } }