Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active Aug 29, 2015
Embed
What would you like to do?
リセット時に色々と設定する
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Camera), typeof(Collider), typeof(Transform))]
public class ResetTest : MonoBehaviour
{
[SerializeField]
Transform _transform;
[SerializeField]
Collider _collider;
[SerializeField]
Camera _camera;
void Reset ()
{
_transform = GetComponent<Transform>();
_collider = GetComponent<Collider>();
_camera = GetComponent<Camera>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment