Last active
April 12, 2018 06:58
-
-
Save todorok1/c2d111365063b95580ebdcd12ba1ed47 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の実験 | |
// Inspectorに表示できるSerializeFieldと、 | |
// publicな変数であってもInspectorから隠すHideInInspectorで実験 | |
// どちらが優先されるんでしょうか。 | |
[SerializeField, HideInInspector] | |
float forceMagnitude = 10.0f; | |
// 結果 : Inspectorに表示されない | |
[HideInInspector, SerializeField] | |
float forceMagnitude = 10.0f; | |
// 結果 : Inspectorに表示されない | |
// [HideInInspector]がつけば絶対隠す。 | |
// というかそもそも[SerializeField]と[HideInInspector]は | |
// 逆のAttributeじゃなかったですね。途中で気付きました。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment