Beispiel #1
0
        /// <summary>
        /// Assign the text value from the Panel_Text.
        /// </summary>
        public void AssignTextValue()
        {
            string text = Panel_Text.GetComponentInChildren <InputField>().text;

            if (text != "")
            {
                //Replace non-ASCII caracters by empty ones.
                string value = Encoding.ASCII.GetString(Encoding.Convert(Encoding.UTF8,
                                                                         Encoding.GetEncoding(
                                                                             Encoding.ASCII.EncodingName,
                                                                             new EncoderReplacementFallback(string.Empty),
                                                                             new DecoderExceptionFallback()
                                                                             ),
                                                                         Encoding.UTF8.GetBytes(text)
                                                                         )
                                                        );
                if (Primitive.primitiveToAssign != null)
                {
                    Primitive.primitiveToAssign.AddText = value;
                    Primitive.primitiveToAssign         = null;
                    MainLayout.Actual.Editor.Save();
                }
            }
            MainLayout.Actual.UI_Canvas.SetActive(true);
            MainLayout.Actual.DisplayUI = false;
        }
Beispiel #2
0
    public void Click()
    {
        if (open == false)
        {
            img_Dec.enabled = false;

            Aud_Filter.reverbPreset = AudioReverbPreset.Underwater;

            Img.color   = Color_Open;
            Img_2.color = Color_Open;

            Panel_Settings.SetActive(true);
            Panel_Text.SetActive(false);

            open = true;
        }
        else if (open == true)
        {
            img_Dec.enabled = true;

            Aud_Filter.reverbPreset = AudioReverbPreset.Generic;

            Img.color   = Color_Close;
            Img_2.color = Color_Close;

            Panel_Text.SetActive(true);
            Panel_Settings.SetActive(false);

            open = false;
        }
    }