コード例 #1
0
    public void SetAudioCaptions(string name, string filePath)
    {
        var newText = UIB_FileManager.ReadTextAssetBundle(name, filePath);

        if (newText == null || newText == "")
        {
            Debug.LogWarning("Null Text Given for Captions");
            //CaptionsCanvas.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>().enabled = false;
            hasCaptions = false;

            //no captions so no screen readable button
            // Debug.Log("turning captions reader off");

            StartCoroutine("TurnOffCaptionsReader");

            return;
        }
        //        Debug.Log("new " + newText);
        hasCaptions   = true;
        AudioCaptions = new TextAsset(newText);

        //        Debug.Log("turning captions reader on");
        CaptionsToggle.GetComponent <Special_AccessibleButton>().enabled = true;
        CaptionsToggle.GetComponent <Button>().enabled = true;
    }
コード例 #2
0
    void PlayVideoFromFile(string src)
    {
        var    filename    = "/hld-general/MeOnDisplay/VideoCaptions/" + src.Replace(" ", "_") + ".txt";
        string videoSource = Application.persistentDataPath + "/hld-general/MeOnDisplay/" + src.Replace(" ", "_") + ".mov";

        TextAsset captions = new TextAsset(UIB_FileManager.ReadTextAssetBundle(filename, "hld/displayed/narratives/video"));

        var vp = GameObject.FindWithTag("App_VideoPlayer").GetComponent <VideoPlayer>();

        vp.GetComponent <UIB_VideoPlayer>().SetVideoCaptions(captions);

        vp.url = videoSource;
        StartCoroutine("PlayVideoCoroutine");
    }
コード例 #3
0
    public void LoadNotes(string ShowName)
    {
        var tmp  = GetComponent <TextMeshProUGUI>();
        var name = ShowName + "ProgramNotes";

        var text = UIB_FileManager.ReadTextAssetBundle(ShowName + "ProgramNotes", "hld/general");

        tmp.text = text;

        if (tmp.text.Length <= 0)
        {
            tmp.enabled = false;
        }
        else
        {
            tmp.enabled = true;
        }
    }
コード例 #4
0
    public void SetAudioCaptions(string name, string filePath)
    {
        if (name == null || name == "")
        {
            return;
        }

        var newText = UIB_FileManager.ReadTextAssetBundle(name, filePath);

        if (newText == null)
        {
            Debug.LogWarning("Null Text Given for Captions");
            captionsCanvas.enabled = false;
            hasCaptions            = false;

            return;
        }
        hasCaptions   = true;
        AudioCaptions = new TextAsset(newText);
    }
コード例 #5
0
 public void InitJsonList()
 {
     ShowName = name.Split('-')[0];
     if (ShowName == "CompanyDancers_Page")
     {
         SourceJson = UIB_FileManager.ReadTextAssetBundle("bios", "hld/bios/json");
         if (SourceJson == null || SourceJson == "")
         {
             return;
         }
         myObject      = JsonUtility.FromJson <BiographyArray>(SourceJson);
         OrderedByName = myObject.data.OrderBy(x => x.Name.Split(' ')[1]);
     }
     else
     {
         SourceJson = UIB_FileManager.ReadTextAssetBundle(ShowName + "ListOfDancers", "hld/general");
         if (SourceJson == null || SourceJson == "")
         {
             return;
         }
         listOfDancers = SourceJson.Replace("\n", "").Split(',');
     }
 }
コード例 #6
0
    private void CheckIsCorrect(string arg0)
    {
        if (TouchScreenKeyboard.isSupported)
        {
            if (GetComponent <InputField>().touchScreenKeyboard.status != TouchScreenKeyboard.Status.Done)
            {
                return;
            }
        }
        var ShowName = name.Split('_')[0];

        var res = "";

        res = UIB_FileManager.ReadTextAssetBundle(ShowName + "AccessCode", "hld/general");

        if (res != "")
        {
            if (arg0.ToLower() == res.ToString().ToLower())
            {
                StartCoroutine("OnCorrectCode1");
            }
            else
            {
                Debug.Log("Correct Code is:" + res);
                if (UAP_AccessibilityManager.IsActive())
                {
                    UAP_AccessibilityManager.Say(" \n\r");
                    GameObject.Find("Accessibility Manager").GetComponent <UAP_AccessibilityManager>().SayPause(.1f);
                    UAP_AccessibilityManager.SayAs("Incorrect Code: Enter Code again", UAP_AudioQueue.EAudioType.App);
                }
            }
        }
        else
        {
            Debug.Log("res is not assigned " + gameObject.name);
        }
    }