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
/// <summary> | |
/// Put this component on game objects that you wish to disable on specific platforms | |
/// </summary> | |
public class DisableOnPlatforms : MonoBehaviour { | |
[SerializeField] | |
[Tooltip("Selected Platforms to disable game object")] | |
private RuntimePlatform[] _platforms; | |
private void OnEnable() { | |
if (_platforms.Contains(Application.platform)) { |
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
/// <summary> | |
/// Attribute that makes a field enable/disable status controlled by a boolean condition | |
/// </summary> | |
public class ToggleFieldAttribute : PropertyAttribute { | |
/// <summary> | |
/// Boolean field to control the enable/disable status | |
/// </summary> | |
public readonly string ConditionalField; |
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 | |
public class NoWhiteSpaceAttribute : PropertyAttribute | |
{ | |
} | |
//Attribute-Drawer | |
[CustomPropertyDrawer(typeof(NoWhiteSpaceAttribute))] | |
public class NoWhiteSpacePropertyDrawer : PropertyDrawer | |
{ | |