Skip to content

Instantly share code, notes, and snippets.

@Jura-Z
Created January 8, 2022 22:17
Show Gist options
  • Save Jura-Z/f2c1d07464220294903035129d47c622 to your computer and use it in GitHub Desktop.
Save Jura-Z/f2c1d07464220294903035129d47c622 to your computer and use it in GitHub Desktop.
81-C# Script-NewBehaviourScript.cs.txt
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using UnityEngine;
using Debug = UnityEngine.Debug;
//[RequireComponent(typeof(Collider))]
public class #SCRIPTNAME# : MonoBehaviour
{
//[SerializeField] private Collider m_Collider;
void SetReferences()
{
//if (m_Collider == null)
// m_Collider = GetComponent<Collider>();
Validate();
}
[Conditional("UNITY_EDITOR")]
private void Validate()
{
//var hasTrigger = GetComponents<Collider>().Any(c => c.isTrigger);
//if (hasTrigger == false)
//{
//Debug.LogError($"Action trigger requests isTrigger == true collider on it. This one ({gameObject.name}) doesn't have it!", gameObject);
//}
}
private void Reset()
{
SetReferences();
}
private void Awake()
{
SetReferences();
}
void Start()
{
#NOTRIM#
}
void Update()
{
#NOTRIM#
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment