以下の内容はhttps://baba-s.hatenablog.com/entry/2022/09/18/132441より取得しました。


【Unity】Repaint を呼び出しても SceneTemplateAsset の Inspector の Dependencies が再描画されない場合

概要

var assembly                      = typeof( SceneTemplateAsset ).Assembly;
var type                          = assembly.GetType( "UnityEditor.SceneTemplate.SceneTemplateAssetInspectorWindow" );
var rebuildDependenciesMethodInfo = type.GetMethod( "RebuildDependencies", BindingFlags.NonPublic | BindingFlags.Instance );
var rootPropertyInfo              = type.GetProperty( "Root", BindingFlags.NonPublic | BindingFlags.Instance );
var root                          = rootPropertyInfo.GetValue( editor );

rebuildDependenciesMethodInfo.Invoke( editor, new[] { root } );

上記のコードで再描画できる

参考サイト様




以上の内容はhttps://baba-s.hatenablog.com/entry/2022/09/18/132441より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14