/// <summary> /// Draws a custom UI for the cloud reco event handler inspector /// </summary> public override void OnInspectorGUI() { // record potential changes for this object Undo.RecordObject(target, "Inspector Change"); CloudRecoEventHandler creh = (CloudRecoEventHandler)target; EditorGUILayout.HelpBox("Here you can set the ImageTargetBehaviour from the scene that will be used to augment new cloud reco search results.", MessageType.Info); bool allowSceneObjects = !EditorUtility.IsPersistent(target); creh.ImageTargetTemplate = (ImageTargetBehaviour)EditorGUILayout.ObjectField("Image Target Template", creh.ImageTargetTemplate, typeof(ImageTargetBehaviour), allowSceneObjects); creh.scanLine = (ScanLine)EditorGUILayout.ObjectField("Scan Line", creh.scanLine, typeof(ScanLine), true); creh.cloudErrorCanvas = (UnityEngine.Canvas)EditorGUILayout.ObjectField("Cloud Reco Error Canvas", creh.cloudErrorCanvas, typeof(UnityEngine.Canvas), true); creh.cloudErrorTitle = (UnityEngine.UI.Text)EditorGUILayout.ObjectField("Cloud Reco Error Title", creh.cloudErrorTitle, typeof(UnityEngine.UI.Text), true); creh.cloudErrorText = (UnityEngine.UI.Text)EditorGUILayout.ObjectField("Cloud Reco Error Text", creh.cloudErrorText, typeof(UnityEngine.UI.Text), true); if (GUI.changed) { EditorUtility.SetDirty(creh); } }
/// <summary> /// Draws a custom UI for the cloud reco event handler inspector /// </summary> public override void OnInspectorGUI() { CloudRecoEventHandler crehb = (CloudRecoEventHandler)target; EditorGUILayout.HelpBox("Here you can set the ImageTargetBehaviour from the scene that will be used to augment new cloud reco search results.", MessageType.Info); bool allowSceneObjects = !EditorUtility.IsPersistent(target); crehb.ImageTargetTemplate = (ImageTargetBehaviour)EditorGUILayout.ObjectField("Image Target Template", crehb.ImageTargetTemplate, typeof(ImageTargetBehaviour), allowSceneObjects); }
public void OnClickLink() { Debug.Log("OnClickLink click!"); GameObject CloudRecognition = GameObject.Find("CloudRecognition"); Debug.Log("CloudRecognition:" + CloudRecognition); CloudRecoEventHandler CloudRecoEventHandler = CloudRecognition.GetComponent <CloudRecoEventHandler>(); Debug.Log("CloudRecoEventHandler:" + CloudRecoEventHandler); Debug.Log("CloudRecoEventHandler.targetMenuURL:" + CloudRecoEventHandler.targetMenuURL); Application.OpenURL(CloudRecoEventHandler.targetMenuURL); }
// //@ToDo 共通化したい // private VideoPlaybackBehaviour PickVideo() // { // VideoPlaybackBehaviour[] behaviours = GameObject.FindObjectsOfType<VideoPlaybackBehaviour>(); // foreach (VideoPlaybackBehaviour vb in behaviours) // { // return vb; // } // return null; // } // IEnumerator StartUnityVideo() { yield return(new WaitForSeconds(2)); Debug.Log("StartUnityVideo"); GameObject CloudRecognition = GameObject.Find("CloudRecognition"); Debug.Log("CloudRecognition:" + CloudRecognition); CloudRecoEventHandler CloudRecoEventHandler = CloudRecognition.GetComponent <CloudRecoEventHandler>(); Debug.Log("CloudRecoEventHandler:" + CloudRecoEventHandler); Debug.Log("CloudRecoEventHandler.targetMovieURL:" + CloudRecoEventHandler.targetMovieURL); Handheld.PlayFullScreenMovie(CloudRecoEventHandler.targetMovieURL, Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFit); Debug.Log("FIN Iniciando video"); yield break; }
protected override void Start() { base.Start(); m_CloudRecoEventHandler = FindObjectOfType <CloudRecoEventHandler>(); }