Unity for Noobs Create a Map and Triggers in URP

1,348
0
Published 2021-10-08

All Comments (6)
  • @thebokworm
    sorry but how does your camera move in the game screen ?
  • @thebokworm
    how did you cycle to rotation, postion, size things for the cube bit
  • @thebokworm
    also is this wrong? using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class TriggerCube : MonoBehaviour { public UnityEvent _physics; public Rigidbody[] _cubes; public void OnTriggerEnter(Collider other) { for(int i = 0; i < _cubes.length; i++) { _cubes[i].isKinematic = false; } Debug.log("Trigger Hit"); //_physics.Invoke(); } } cause I'm getting these issues Assets\TriggerCube.cs(16,35): error CS1061: 'Rigidbody[]' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'Rigidbody[]' could be found (are you missing a using directive or an assembly reference?) and Assets\TriggerCube.cs(19,9): error CS0104: 'Debug' is an ambiguous reference between 'UnityEngine.Debug' and 'System.Diagnostics.Debug'