Documentation for the Unity C# Library
Loading...
Searching...
No Matches
CollisionLogger.cs
Go to the documentation of this file.
1using PixoVR.Core;
2using System;
3using System.Collections;
4using System.Collections.Generic;
5using UnityEngine;
6using UnityEngine.UI;
7
8public class CollisionLogger : MonoBehaviour
9{
10 [SerializeField]
11 List<GameObject> itemCollision = new List<GameObject>();
12 private void Awake()
13 {
15 }
16
17 private void LogCollision(Collider reporter, Collision collision)
18 {
19 Debug.Log(reporter.name + " with " + collision.gameObject.name);
20 itemCollision.Add(collision.gameObject);
21 }
22
23}
List< GameObject > itemCollision
[SerializeField]
void LogCollision(Collider reporter, Collision collision)
Intentionally made partial, in case you want to extend it easily.