void OnEnable() { if (serializedObject == null) { return; } fov = serializedObject.targetObject as FOVCollider; length = serializedObject.FindProperty("Length"); baseSize = serializedObject.FindProperty("BaseSize"); fovAngle = serializedObject.FindProperty("FOVAngle"); elevationAngle = serializedObject.FindProperty("ElevationAngle"); resolution = serializedObject.FindProperty("Resolution"); }
void Awake() { mf = GetComponent <MeshFilter>(); fov = GetComponent <FOVCollider>(); }