Esempio n. 1
0
 public override void Dispose()
 {
     if (_preview != null)
     {
         _preview.Dispose();
         _preview = null;
     }
 }
Esempio n. 2
0
        protected override void PreviewInSceneInternal(WorldStampCreator parent)
        {
            var bounds = parent.Template.Bounds;

            if (_preview == null || _preview.IsDisposed())
            {
                _preview = new WorldStampPreview();
                _dirty   = true;
            }
            if (_dirty)
            {
                _preview.Invalidate(
                    Heights, () => bounds.size, () => bounds.center.xz().x0z(bounds.min.y + ZeroLevel * bounds.size.y), () => Vector3.one,
                    () => Quaternion.identity, () => bounds.size, true, null, null,
                    () => parent.SceneGUIOwner == this, 128);
                _dirty = false;
            }
        }