internal static void ToggleDebugDrawing(bool targetState) { var targetStateString = targetState ? "true" : "false"; var attribute = "draw"; MetaCoreInterop.meta_update_attribute("HandsDataPreprocessingBlock", attribute, targetStateString); MetaCoreInterop.meta_update_attribute("HandSegmentationBlock", attribute, targetStateString); MetaCoreInterop.meta_update_attribute("HandTrackingBlock", attribute, targetStateString); MetaCoreInterop.meta_update_attribute("HandFeatureExtractionBlock", attribute, targetStateString); }
/// <summary> /// Updated a coco attribute. /// </summary> /// <param name="blockName">Name of block to update.</param> /// <param name="attributeName">Name of paramiter to update.</param> /// <param name="attributeValue">Target string value for specified attribute.</param> /// <returns></returns> public static bool SetAttribute(string blockName, string attributeName, string attributeValue) { if (!MetaCoreInterop.meta_update_attribute(blockName, attributeName, attributeValue)) { Debug.Log("Failed to update attribute: " + blockName + " " + attributeName); return(false); } return(true); }