17 public EditorApi editor {
get;
protected set; }
19 public class EditorApi {
22 public Mesh pickingMesh;
29 _graphic.isRepresentationDirty =
true;
31 foreach (var data
in _graphic._featureData) {
32 data.MarkFeatureDirty();
35 if (!Application.isPlaying) {
36 if (_graphic.isAttachedToGroup && !_graphic.transform.IsChildOf(_graphic._attachedRenderer.transform)) {
37 _graphic.OnDetachedFromGroup();
40 if (_graphic.isAttachedToGroup) {
41 _graphic._attachedRenderer.editor.ScheduleRebuild();
42 _graphic._preferredRendererType = _graphic.attachedGroup.renderingMethod.GetType();
45 var group = _graphic.attachedGroup;
47 if (!group.graphics.Contains(_graphic)) {
48 _graphic.OnDetachedFromGroup();
49 group.TryAddGraphic(_graphic);
56 if (pickingMesh !=
null && pickingMesh.vertexCount != 0) {
57 Gizmos.color =
new Color(1, 0, 0, 0);
58 Gizmos.DrawMesh(pickingMesh);
67 public virtual void RebuildEditorPickingMesh() { }
74 if (!Application.isPlaying) {
LeapRenderingMethod renderingMethod
Gets the rendering method used for this group. This can only be changed at edit time using either the...
virtual void OnValidate()
LeapSpaceAnchor anchor
Returns the space anchor for this graphic. This will be null if the graphic is not currently part of ...
virtual void OnDrawGizmos()
virtual void OnAttachedToGroup(LeapGraphicGroup group, LeapSpaceAnchor anchor)
Called by the system when this graphic is attached to a group. This method is invoked both at runtime...