diff --git a/Plugins/AssetUsageDetector/Editor/VariableGetter.cs b/Plugins/AssetUsageDetector/Editor/VariableGetter.cs index 87c8fa9..5b44e10 100644 --- a/Plugins/AssetUsageDetector/Editor/VariableGetter.cs +++ b/Plugins/AssetUsageDetector/Editor/VariableGetter.cs @@ -9,14 +9,14 @@ namespace AssetUsageDetectorNamespace public delegate object VariableGetVal( object obj ); // Custom struct to hold a variable, its important properties and its getter function - public struct VariableGetterHolder + public readonly struct VariableGetterHolder { public readonly MemberInfo variable; public readonly bool isSerializable; private readonly VariableGetVal getter; - public string Name { get { return variable.Name; } } - public bool IsProperty { get { return variable is PropertyInfo; } } + public readonly string Name { get { return variable.Name; } } + public readonly bool IsProperty { get { return variable is PropertyInfo; } } public VariableGetterHolder( FieldInfo fieldInfo, VariableGetVal getter, bool isSerializable ) { @@ -32,7 +32,7 @@ namespace AssetUsageDetectorNamespace this.getter = getter; } - public object Get( object obj ) + public readonly object Get( object obj ) { try {