Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Packages/AudioConductor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.1.1 - 2026/05/14

- Fix Issues
- Add Unity 6000.x API compatibility for generic TreeView types and InstanceID-to-EntityId transition

## v2.1.0 - 2026/05/13

- New Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@
using AudioConductor.Editor.Core.Models;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;

namespace AudioConductor.Editor.Core.Tools.CodeGen
{
internal static class CueEnumDefinitionOpener
{
#if UNITY_6000_5_OR_NEWER
[OnOpenAsset(0)]
public static bool OnOpen(UnityEngine.EntityId entityId, int line)
=> OnOpenImpl(EditorUtility.EntityIdToObject(entityId));
#else
[OnOpenAsset(0)]
public static bool OnOpen(int instanceID, int line)
{
var asset = EditorUtility.InstanceIDToObject(instanceID);
return OnOpenImpl(EditorUtility.InstanceIDToObject(instanceID));
}
#endif

private static bool OnOpenImpl(Object asset)
{
if (asset is not CueEnumDefinition definition)
return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif
using System.Collections.Generic;
using AudioConductor.Core.Models;
using AudioConductor.Editor.Core.Models;
using UnityEditor.IMGUI.Controls;

namespace AudioConductor.Editor.Core.Tools.CodeGen
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#else
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;
#endif
using System;
using UnityEditor.IMGUI.Controls;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
using UnityEditor.IMGUI.Controls;
using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_6000_2_OR_NEWER
using TreeView = UnityEditor.IMGUI.Controls.TreeView<int>;
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeView = UnityEditor.IMGUI.Controls.TreeView;
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif

namespace AudioConductor.Editor.Core.Tools.CodeGen
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@
using AudioConductor.Core.Models;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;

namespace AudioConductor.Editor.Core.Tools.CueSheetEditor
{
internal static class CueSheetAssetOpener
{
#if UNITY_6000_5_OR_NEWER
[OnOpenAsset(0)]
public static bool OnOpen(EntityId entityId, int line)
=> OnOpenImpl(EditorUtility.EntityIdToObject(entityId));
#else
[OnOpenAsset(0)]
public static bool OnOpen(int instanceID, int line)
{
var asset = EditorUtility.InstanceIDToObject(instanceID);
return OnOpenImpl(EditorUtility.InstanceIDToObject(instanceID));
}
#endif

private static bool OnOpenImpl(Object asset)
{
if (asset is not CueSheetAsset data)
return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif
using System.Collections.Generic;
using AudioConductor.Core.Enums;
using AudioConductor.Editor.Core.Tools.CueSheetEditor.Enums;
using UnityEditor.IMGUI.Controls;

namespace AudioConductor.Editor.Core.Tools.CueSheetEditor.Models
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand All @@ -13,7 +18,6 @@
using AudioConductor.Editor.Core.Tools.Shared;
using AudioConductor.Editor.Foundation.CommandBasedUndo;
using AudioConductor.Editor.Foundation.TinyRx;
using UnityEditor.IMGUI.Controls;

namespace AudioConductor.Editor.Core.Tools.CueSheetEditor.Models
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif
using System;
using AudioConductor.Editor.Core.Tools.CueSheetEditor.DataTransferObjects;
using AudioConductor.Editor.Core.Tools.CueSheetEditor.Views;
using AudioConductor.Editor.Foundation.TinyRx;
using UnityEditor.IMGUI.Controls;

namespace AudioConductor.Editor.Core.Tools.CueSheetEditor.Models.Interfaces
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ public AudioClip? AudioClip
set
{
var actionTypeId = value == null
#if UNITY_6000_4_OR_NEWER
? $"{_tag} Unset Track {nameof(AudioClip)} {(AudioClip == null ? default : AudioClip.GetEntityId())}"
: $"{_tag} Set Track {nameof(AudioClip)} {value.GetEntityId()}";
#else
? $"{_tag} Unset Track {nameof(AudioClip)} {(AudioClip == null ? 0 : AudioClip.GetInstanceID())}"
: $"{_tag} Set Track {nameof(AudioClip)} {value.GetInstanceID()}";
#endif

var old = _target.Select(track => new AudioClipAndDependencyValueBackup(track)).ToArray();
_history.Register(actionTypeId, Redo, Undo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#else
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;
#endif
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
using UnityEditor.IMGUI.Controls;
using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_6000_2_OR_NEWER
using TreeView = UnityEditor.IMGUI.Controls.TreeView<int>;
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeView = UnityEditor.IMGUI.Controls.TreeView;
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif

namespace AudioConductor.Editor.Core.Tools.CueSheetEditor.Views
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

#nullable enable

#if UNITY_6000_2_OR_NEWER
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion Packages/AudioConductor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jp.co.cyberagent.audioconductor",
"version": "2.1.0",
"version": "2.1.1",
"displayName": "Audio Conductor",
"unity": "2022.3",
"license": "MIT",
Expand Down