private void OnEnable() { eyeCollection = (EyeCollection)target; eyeCount = serializedObject.FindProperty("eyeCount"); rootTextureFolder = serializedObject.FindProperty("rootTextureFolder"); textureNamingPrefix = serializedObject.FindProperty("textureNamingPrefix"); }
private void Awake() { camera_RGB = transform.Find("Camera_RGB").GetComponent <Camera>(); camera_Z = transform.Find("Camera_Z").GetComponent <Camera>(); renderTexture_RGB = camera_RGB.targetTexture; renderTexture_Z = camera_Z.targetTexture; eyeCollection = transform.parent.GetComponentInParent <EyeCollection>(); // texturePath is set by eyeCollection root folder property; starts after 'Assets' and ends with / texturePath = AssetDatabase.GetAssetPath(eyeCollection.rootTextureFolder); texturePath = texturePath.Split(new string[1] { "Assets" }, StringSplitOptions.None)[1] + "/"; }