浏览代码

renamed asset source editor description attribute

/generic-asset-sources
sleal-unity 3 年前
当前提交
38f6b930
共有 5 个文件被更改,包括 26 次插入26 次删除
  1. 2
      com.unity.perception/Editor/Randomization/VisualElements/AssetSource/AssetSourceElement.cs
  2. 2
      com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceEditorDescriptionAttribute.cs.meta
  3. 24
      com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceEditorDescriptionAttribute.cs
  4. 24
      com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceLocationNotes.cs
  5. 0
      /com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceEditorDescriptionAttribute.cs.meta

2
com.unity.perception/Editor/Randomization/VisualElements/AssetSource/AssetSourceElement.cs


void UpdateLocationUI(Type type)
{
m_LocationToolbarMenu.text = GetDisplayName(type);
var notesAttribute = (AssetSourceLocationNotes)Attribute.GetCustomAttribute(type, typeof(AssetSourceLocationNotes));
var notesAttribute = (AssetSourceEditorDescriptionAttribute)Attribute.GetCustomAttribute(type, typeof(AssetSourceEditorDescriptionAttribute));
if (notesAttribute != null)
{
m_LocationNotes.text = notesAttribute.notes;

2
com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceEditorDescriptionAttribute.cs.meta


fileFormatVersion: 2
guid: b10fba6f9bbaaef498a12faefec212f9
guid: 2aa6aeb2e6318114fb5ac0829edcac00
MonoImporter:
externalObjects: {}
serializedVersion: 2

24
com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceEditorDescriptionAttribute.cs


using System;
namespace UnityEngine.Perception.Randomization
{
/// <summary>
/// Used to annotate an AssetSourceLocation with description notes within the inspector UI
/// </summary>
public class AssetSourceEditorDescriptionAttribute : Attribute
{
/// <summary>
/// The text notes to display in the AssetSourceLocation's UI.
/// </summary>
public string notes;
/// <summary>
/// Constructs a new AssetSourceLocationNotes attribute
/// </summary>
/// <param name="notes">The text notes to display in the inspector</param>
public AssetSourceEditorDescriptionAttribute(string notes)
{
this.notes = notes;
}
}
}

24
com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceLocationNotes.cs


using System;
namespace UnityEngine.Perception.Randomization
{
/// <summary>
/// Used to annotate an AssetSourceLocation with notes within the inspector UI
/// </summary>
public class AssetSourceLocationNotes : Attribute
{
/// <summary>
/// The text notes to display in the AssetSourceLocation's UI.
/// </summary>
public string notes;
/// <summary>
/// Constructs a new AssetSourceLocationNotes attribute
/// </summary>
/// <param name="notes">The text notes to display in the inspector</param>
public AssetSourceLocationNotes(string notes)
{
this.notes = notes;
}
}
}

/com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceLocationNotes.cs.meta → /com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceEditorDescriptionAttribute.cs.meta

正在加载...
取消
保存