This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static float ConvertRange(float oldValue, float oldMin, float oldMax, float newMin = 0, float newMax = 1) | |
| { | |
| float oldRange = (oldMax - oldMin); | |
| if (oldRange == 0) | |
| return newMin; | |
| else | |
| return (((oldValue - oldMin) * (newMax - newMin)) / oldRange) + newMin; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax on | |
| set noerrorbells | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set smartindent | |
| set nu | |
| set nowrap | |
| set smartcase | |
| set noswapfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| // Note ensure editor resolution matches Canvas fixed resolution (1024 x 768) | |
| // | |
| /// <summary> | |
| /// The intention is to allow the viewport to be move around the screen as controlled by a RectTransform, which it does. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://EditorConfig.org | |
| # This file is the top-most EditorConfig file | |
| root = true | |
| # All Files | |
| [*] | |
| charset = utf-8 | |
| end_of_line = crlf | |
| indent_style = space |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| using UnityEngine.Events; | |
| using UnityEngine.UI; | |
| namespace Ui | |
| { | |
| public class ToggleGroupIndexed : MonoBehaviour | |
| { | |
| public event Action<int> SelectedChanged; |
NewerOlder