Created
August 24, 2021 15:05
-
-
Save monry/d13ae5c78a887c8c775ef15bdaebcd99 to your computer and use it in GitHub Desktop.
[field: SerializeField] な属性を付けた Property の表示テスト用 MonoBehaviour
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; | |
namespace Monry | |
{ | |
public class Sample : MonoBehaviour | |
{ | |
[field: SerializeField] private int IntValue { get; set; } | |
[field: SerializeField] private bool BoolValue { get; set; } | |
[field: SerializeField] private string StringValue { get; set; } | |
[field: SerializeField] private FooBarStruct FooBar { get; set; } | |
[Serializable] | |
private struct FooBarStruct | |
{ | |
[field: SerializeField] private int IntValue { get; set; } | |
[field: SerializeField] private bool BoolValue { get; set; } | |
[field: SerializeField] private string StringValue { get; set; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment