Last active
April 12, 2018 08:50
-
-
Save todorok1/5a3bcb39d34d782462f2dfcba84eff61 to your computer and use it in GitHub Desktop.
Unityチュートリアル・Inspectorの入力値制限のスクリプト。
This file contains 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
// 複数のAttributeの書き方 | |
// カンマ区切り | |
[SerializeField, Range(0f, 90f)] | |
float forceAngle = 45.0f; | |
// 逆もいける | |
[Range(0f, 90f), SerializeField] | |
float forceAngle = 45.0f; | |
// []で分ける | |
[SerializeField][Range(0f, 90f)] | |
float forceAngle = 45.0f; | |
// 改行する | |
[SerializeField] | |
[Range(0f, 90f)] | |
float forceAngle = 45.0f; | |
// もっと改行してもいいのよ? | |
[SerializeField] | |
[Range(0f, 90f)] | |
float forceAngle = 45.0f; | |
// 頭にきました | |
[SerializeField, Range(0f, 90f)] float forceAngle = 45.0f; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment