expose scripting input types for objects/classes
yc
Posts: 41 🔥
Classes or Objects should be exposable as a scripting input type, especially for arrays of them.
EXAMPLE: In the ML Multiple Object Templates, see BBoxBuilder.js - imagine if instead of having to write out for every single object type:
//@input bool cup //@input Asset.Material cupColorFilter //@input SceneObject cupSceneObject
and
detectableClasses.push({ enabled: script.cup, colorFilter: script.cupColorFilter, model: script.cupSceneObject, index: 1, label: "Cup", });
etc
it's simply
//@input Object.DetectableClass[] detectableClass
where each defined parameter in the class is exposed accordingly\
(This is available in Unity.)
2