prefabとprefab instanceの同期が失敗してグラフが壊れてしまう問題

Here is a forum for reporting failure to Arbor developer.
Please read the forum rules carefully and enter the information necessary to confirm the problem.

Note:
  • Please read the "Update Guide" carefully when updating Arbor.
  • The bugs that we already know are summarized in "Known Issues", so please check once.
  • Please check ReleaseNote and use the latest version if possible before reporting a bug.
  • Unity beta and alpha versions are not supported. Please use the official release version.
  • In principle, defects caused by the introduction of other assets are not supported. If you find a defect, please report it after isolating which asset is the problem.

ここは、Arbor開発者へ不具合を報告するためのフォーラムです。
フォーラムルールをよく読み、不具合確認に必要な情報を記載するようお願いします。

注意点:
  • Arborを更新する際は「アップデートガイド」をよく読み行ってください。
  • 既に把握している不具合は「既知の問題」にまとめてありますので一度確認してみてください。
  • 不具合報告をする前にReleaseNoteを確認し、なるべく最新バージョンを使用して下さい。
  • Unityのベータ版およびアルファ版はサポート対象外です。正式リリース版をご利用ください。
  • 他アセット導入による不具合は原則サポート対象外です。不具合を見つけた場合はどのアセットの問題であるか切り分けた上でのご報告をお願いいたします。

Forum rules
The items necessary for reporting are as follows.
  • OS(Required)
  • Unity version(Required)
  • Arbor version(Required)
  • How to reproduce(Required)
    The reproduction method should be described accurately so that anyone can read the same procedure.
    If you do not know the exact reproduction procedure, as long as you can remember it, so please tell us what you were doing immediately before and the last time you edited it.
  • Build platform
  • Reproduction project (Minimum configuration not including Arbor and other assets) or video

Note:
  • Please read the "Update Guide" carefully when updating Arbor.
  • The bugs that we already know are summarized in "Known Issues", so please check once.
  • Please check ReleaseNote and use the latest version if possible before reporting a bug.
  • Unity beta and alpha versions are not supported. Please use the official release version.
  • In principle, defects caused by the introduction of other assets are not supported. If you find a defect, please report it after isolating which asset is the problem.

報告に必要な項目は以下の通りです。
  • OS(必須)
  • Unityバージョン(必須)
  • Arborバージョン(必須)
  • 再現方法(必須)
    再現方法については、誰が読んでも同様の手順を行えるよう正確に記述するようにお願いいたします。
    もし正確な再現手順が不明な場合、覚えている限りで構いませんので直前に行っていたことや最後に編集した時のことを教えてください。
  • ビルドプラットフォーム
  • 再現プロジェクト(Arborや他アセットなどを含まない最小構成)もしくは動画

注意点:
  • Arborを更新する際は「アップデートガイド」をよく読み行ってください。
  • 既に把握している不具合は「既知の問題」にまとめてありますので一度確認してみてください。
  • 不具合報告をする前にReleaseNoteを確認し、なるべく最新バージョンを使用して下さい。
  • Unityのベータ版およびアルファ版はサポート対象外です。正式リリース版をご利用ください。
  • 他アセット導入による不具合は原則サポート対象外です。不具合を見つけた場合はどのアセットの問題であるか切り分けた上でのご報告をお願いいたします。
Boily
Posts: 7
Joined: 2024/03/06 07:48

prefabとprefab instanceの同期が失敗してグラフが壊れてしまう問題

Post by Boily »

unity ver 2022.3.19f1
arbor3 ver 3.10.0

以下、大まかな状況説明です。
prefabにFSMやbehavior treeが実装してあり、そのインスタンスがシーンに配置されている。
インスタンスのグラフを編集し、その変更内容を元のprefabに適用しようと試みる。(modified component > apply to prefab 'name')
インスタンスの変更点が消える。一部または全部のビヘイビアがインスペクタにコンポーネントとして表示される。
prefab側に変更は適用されず。
といった具合に、グラフの構成要素によって挙動が一定でないものの、総じてプレハブとの同期が失敗してしまいます。

以下、エラーメッセージです。
MissingReferenceException: The object of type 'SubBehaviourTree' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Arbor.NodeBehaviour.get_nodeGraph () (at Assets/Plugins/Arbor/Internal/Scripts/NodeBehaviour.cs:76)
Arbor.NodeGraph.DestroyUnusedNodeBehaviour (Arbor.NodeBehaviour behaviour) (at Assets/Plugins/Arbor/Internal/Scripts/NodeGraph.cs:1612)
Arbor.NodeGraph.DestroyUnusedSubComponents () (at Assets/Plugins/Arbor/Internal/Scripts/NodeGraph.cs:1655)
Arbor.NodeGraph.OnValidateDelay () (at Assets/Plugins/Arbor/Internal/Scripts/NodeGraph.cs:1821)
ArborEditor.ComponentEditorProcessor.OnDelayCall () (at Assets/Plugins/Arbor/Internal/Editor/UndoComponentInitializer.cs:112)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <2acbecbc299e4654adc94df891af51f2>:0)

Destroying assets is not permitted to avoid data loss.
If you really want to remove an asset use DestroyImmediate (theObject, true);
UnityEngine.Object:DestroyImmediate (UnityEngine.Object)
Arbor.ComponentUtility:Destroy (UnityEngine.Object) (at Assets/Plugins/Arbor/Internal/Scripts/ComponentUtility.cs:120)
Arbor.NodeGraph:Destroy (Arbor.NodeGraph) (at Assets/Plugins/Arbor/Internal/Scripts/NodeGraph.cs:3404)
ArborEditor.Clipboard:DestroyChildGraphs (Arbor.NodeBehaviour) (at Assets/Plugins/Arbor/Internal/Editor/Clipboard.cs:474)
ArborEditor.Clipboard:DoCopyNodeBehaviour (Arbor.NodeBehaviour,Arbor.NodeBehaviour,bool) (at Assets/Plugins/Arbor/Internal/Editor/Clipboard.cs:629)
ArborEditor.BehaviourTree.ActionBehaviourClipboardProcessor:MoveBehaviour (Arbor.Node,Arbor.NodeBehaviour) (at Assets/Plugins/Arbor/Internal/Editor/BehaviourTree/Clipboards/ActionBehaviourClipboardProcessor.cs:33)
ArborEditor.Clipboard:MoveBehaviour (Arbor.Node,Arbor.NodeBehaviour) (at Assets/Plugins/Arbor/Internal/Editor/Clipboard.cs:701)
ArborEditor.ComponentEditorProcessor:MoveBehaviour (Arbor.Node,Arbor.NodeBehaviour) (at Assets/Plugins/Arbor/Internal/Editor/UndoComponentInitializer.cs:67)
Arbor.ComponentUtility:MoveBehaviour (Arbor.Node,Arbor.NodeBehaviour) (at Assets/Plugins/Arbor/Internal/Scripts/ComponentUtility.cs:231)
Arbor.BehaviourTree.TreeBehaviourNode:OnGraphChanged () (at Assets/Plugins/Arbor/Internal/Scripts/BehaviourTree/TreeBehaviourNode.cs:365)
Arbor.Node:ChangeGraph (Arbor.NodeGraph) (at Assets/Plugins/Arbor/Internal/Scripts/Node.cs:214)
Arbor.NodeGraph:OnValidateDelay () (at Assets/Plugins/Arbor/Internal/Scripts/NodeGraph.cs:1801)
ArborEditor.ComponentEditorProcessor:OnDelayCall () (at Assets/Plugins/Arbor/Internal/Editor/UndoComponentInitializer.cs:112)
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: prefabとprefab instanceの同期が失敗してグラフが壊れてしまう問題

Post by caitsithware »

ご報告ありがとうございます。

「Modified Component > Apply to Prefab 'Name'」はそのコンポーネントのみをプレハブに適用する機能ですが、Arbor3では内部的にStateBehaviourなどのコンポーネントを同GameObjectに追加している関係で、ArborFSMやBehaviourTreeに対して行った場合正常動作いたしません。
その機能についてUnityエディタ拡張もできないため、現時点では仕様ということでご理解ください。
お手数おかけしますが、毎度プレハブモードで編集するかInsepectorのヘッダ部にある「Overrides」から「Apply All」ですべてのコンポーネントを適用するようにしてください。
Boily
Posts: 7
Joined: 2024/03/06 07:48

Re: prefabとprefab instanceの同期が失敗してグラフが壊れてしまう問題

Post by Boily »

お返事ありがとうございます。
仕様ということで承知いたしました。
Post Reply