Browse Source

add a datablock namespace hook for onInspect

AzaezelX 8 months ago
parent
commit
818d76d481
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Templates/BaseGame/game/tools/base/utils/inspector.ed.tscript

+ 7 - 0
Templates/BaseGame/game/tools/base/utils/inspector.ed.tscript

@@ -287,3 +287,10 @@ function EditorInspectorBase::getFullFilePath( %field )
    else
    else
       return makeFullPath( %fileName, getMainDotCsDir() );
       return makeFullPath( %fileName, getMainDotCsDir() );
 }
 }
+
+function GameBase::onInspect(%this, %inspector)
+{
+    Parent::onInspect(%this, %inspector);
+    if (%this.getDatablock().isMethod("onInspect"))
+        %this.getDatablock().onInspect(%this, %inspector);
+}