コード例 #1
0
    //----------------------------------------//
    void Update()
    {
        int targetSize = textfield.text.Length > CharCount ? WantedSize : defaultSize;

        if (targetSize != textfield.size)
        {
            textfield.size = targetSize;
            textfield.ApplyParameters(true);
        }

        /*if( textfield.text.Length > CharCount )
         * {
         *      textfield.size = WantedSize;
         *      textfield.ApplyParameters();
         * }
         * else
         * {
         *      textfield.size = defaultSize;
         *      textfield.ApplyParameters();
         * }*/
    }