可用的非分配方法替代方案
Unity.PreferNonAllocApi
resharper_unity_prefer_non_alloc_api_highlighting | 警告 |
在继承自 'PropertyDrawer' 的类中避免使用 'base.OnGUI()'
Unity.PropertyDrawerOnGUIBase
resharper_unity_property_drawer_on_gui_base_highlighting | 警告 |
无法解析组件或 ScriptableObject
Unity.UnresolvedComponentOrScriptableObject
resharper_unity_unresolved_component_or_scriptable_object_highlighting | 警告 |
DOTS:IAspect 字段必须为以下类型之一:RefRW、RefRO、EnabledRefRW、EnabledRefRO、DynamicBuffer 或 Entity
Unity.Entities.AspectWrongFieldsType
resharper_unity_entities_aspect_wrong_fields_type_highlighting | 错误 |
DOTS:类型关键字不一致
Unity.Entities.InconsistentModifiersForDotsInheritor
resharper_unity_entities_inconsistent_modifiers_for_dots_inheritor_highlighting | 错误 |
DOTS:指定的类型必须为结构体类型
Unity.Entities.MustBeStructForDotsInheritor
resharper_unity_entities_must_be_struct_for_dots_inheritor_highlighting | 错误 |
已声明同名事件函数
Unity.DuplicateEventFunction
resharper_unity_duplicate_event_function_highlighting | 警告 |
期望类型为 'Component' 或 'MonoBehaviour' 的派生类型
Unity.ExpectedComponent
resharper_unity_expected_component_highlighting | 警告 |
期望类型为 'ScriptableObject' 的派生类型
Unity.ExpectedScriptableObject
resharper_unity_expected_scriptable_object_highlighting | 警告 |
'ComponentLookup' 类型的字段在使用前必须先更新。
Unity.Entities.NotUpdatedComponentLookup
resharper_unity_entities_not_updated_component_lookup_highlighting | 警告 |
文件名应与程序集名称一致
MISMATCHED_ASMDEF_FILENAME
resharper_mismatched_asmdef_filename_highlighting | 建议 |
未定义分组路径
Odin.OdinUnknownGroupingPath
resharper_odin_odin_unknown_grouping_path_highlighting | 警告 |
方法签名不正确
Unity.IncorrectMethodSignature
resharper_unity_incorrect_method_signature_highlighting | 警告 |
Odin 分组属性类型不正确
Odin.OdinMemberWrongGroupingAttribute
resharper_odin_odin_member_wrong_grouping_attribute_highlighting | 警告 |
成员同时出现在多个 UI 分组中
Odin.OdinMemberPresentInMultipleGroups
resharper_odin_odin_member_present_in_multiple_groups_highlighting | 警告 |
字符串字面量中引用的方法签名不符合预期
Unity.IncorrectMethodSignatureInStringLiteral
resharper_unity_incorrect_method_signature_in_string_literal_highlighting | 警告 |
'MonoBehaviour' 实例必须通过 'GameObject.AddComponent<T>()' 实例化,而非 'new'
Unity.IncorrectMonoBehaviourInstantiation
resharper_unity_incorrect_mono_behaviour_instantiation_highlighting | 警告 |
参数应为 'Component' 的派生类型
Unity.ParameterNotDerivedFromComponent
resharper_unity_parameter_not_derived_from_component_highlighting | 警告 |
属性可能被错误地应用于多个字段
Unity.PossibleMisapplicationOfAttributeToMultipleFields
resharper_unity_possible_misapplication_of_attribute_to_multiple_fields_highlighting | 警告 |
对派生自 'UnityEngine.Object' 的类型进行 null 合并操作会绕过底层 Unity 引擎对象的生命周期检查,可能导致生命周期检查被非预期绕过
Unity.NoNullCoalescing
resharper_unity_no_null_coalescing_highlighting | 已禁用 |
对派生自 'UnityEngine.Object' 的类型进行 null 传播操作会绕过底层 Unity 引擎对象的生命周期检查,可能导致生命周期检查被非预期绕过
Unity.NoNullPropagation
resharper_unity_no_null_propagation_highlighting | 已禁用 |
对派生自 'UnityEngine.Object' 的类型进行模式匹配 null 检查会绕过底层 Unity 引擎对象的生命周期检查,可能导致生命周期检查被非预期绕过
Unity.NoNullPatternMatching
resharper_unity_no_null_pattern_matching_highlighting | 已禁用 |
建议优先使用基于 GUID 的程序集引用
Unity.PreferGuidReference
resharper_unity_prefer_guid_reference_highlighting | 提示 |
属性用法多余(应用于此声明类型时属性多余)
Unity.RedundantAttributeOnTarget
resharper_unity_redundant_attribute_on_target_highlighting | 警告 |
属性用法多余('FormerlySerializedAs' 属性多余)
Unity.RedundantFormerlySerializedAsAttribute
resharper_unity_redundant_formerly_serialized_as_attribute_highlighting | 警告 |
属性用法多余('HideInInspector' 属性多余)
Unity.RedundantHideInInspectorAttribute
resharper_unity_redundant_hide_in_inspector_attribute_highlighting | 警告 |
属性用法多余('InitializeOnLoad' 属性多余)
Unity.RedundantInitializeOnLoadAttribute
resharper_unity_redundant_initialize_on_load_attribute_highlighting | 警告 |
属性用法多余('SerializeField' 属性多余)
Unity.RedundantSerializeFieldAttribute
resharper_unity_redundant_serialize_field_attribute_highlighting | 警告 |
Unity 事件函数多余
Unity.RedundantEventFunction
resharper_unity_redundant_event_function_highlighting | 警告 |
多次访问内置组件的属性效率低下
Unity.InefficientPropertyAccess
resharper_unity_inefficient_property_access_highlighting | 已禁用 |
场景不存在
Unity.LoadSceneUnexistingScene
resharper_unity_load_scene_unexisting_scene_highlighting | 警告 |
场景在构建设置中被禁用
Unity.LoadSceneDisabledSceneName
resharper_unity_load_scene_disabled_scene_name_highlighting | 警告 |
'ScriptableObject' 实例必须通过 'ScriptableObject.CreateInstance<T>()' 实例化,而非 'new'
Unity.IncorrectScriptableObjectInstantiation
resharper_unity_incorrect_scriptable_object_instantiation_highlighting | 警告 |
对象实例化后立即设置 'parent' 属性效率低下
Unity.InstantiateWithoutParent
resharper_unity_instantiate_without_parent_highlighting | 警告 |
场景短名称不唯一
Unity.LoadSceneAmbiguousSceneName
resharper_unity_load_scene_ambiguous_scene_name_highlighting | 警告 |
基于字符串的图形属性查找效率低下
Unity.PreferAddressByIdToGraphicsParams
resharper_unity_prefer_address_by_id_to_graphics_params_highlighting | 警告 |
基于字符串的组件类型查找效率低下
Unity.PreferGenericMethodOverload
resharper_unity_prefer_generic_method_overload_highlighting | 警告 |
构建设置中缺少索引
Unity.LoadSceneWrongIndex
resharper_unity_load_scene_wrong_index_highlighting | 警告 |
输入名称未在 Input 管理器中定义
Unity.UnknownInputAxes
resharper_unity_unknown_input_axes_highlighting | 警告 |
'标签与图层' 中未定义该层
Unity.UnknownLayer
resharper_unity_unknown_layer_highlighting | 警告 |
项目中未定义该资源
Unity.UnknownResource
resharper_unity_unknown_resource_highlighting | 警告 |
已为其他菜单项定义了相同的快捷键
Unity.DuplicateShortcut
resharper_unity_duplicate_shortcut_highlighting | 警告 |
'标签与图层' 中未定义该标签
Unity.UnknownTag
resharper_unity_unknown_tag_highlighting | 警告 |
项目中不存在同名动画状态
Unity.UnknownAnimatorStateName
resharper_unity_unknown_animator_state_name_highlighting | 警告 |
构建设置中不存在同名场景
Unity.LoadSceneUnknownSceneName
resharper_unity_load_scene_unknown_scene_name_highlighting | 警告 |
如需在函数中使用 'GetSingleton' 调用的结果,'OnCreate' 必须包含 'RequireForUpdate' 调用
Unity.Entities.SingletonMustBeRequested
resharper_unity_entities_singleton_must_be_requested_highlighting | 警告 |
请使用 'CompareTag' 替代显式字符串比较
Unity.ExplicitTagComparison
resharper_unity_explicit_tag_comparison_highlighting | 警告 |