Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TriggerEnabledBoxCollider : MonoBehaviour {
#region MonoBehaviour
void Reset()
var colllider = this.GetComponent<Collider>();
if (colllider)
colllider.isTrigger = true;
var rigidbody = this.GetComponent<Rigidbody>();
if (rigidbody)
rigidbody.useGravity = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment