예제 #1
0
        public void OnEnable()
        {
            if (target != _target)
            {
                _target = target as PlanetAsset;

                if (textureGenerator == null)
                {
                    textureGenerator         = new PlanetTextureGenerator();
                    textureGenerator._target = _target;
                }
            }
        }
예제 #2
0
        public void updatePreview()
        {
            if (Selection.activeObject != null)
            {
                if (Selection.activeObject is PlanetAsset && Selection.activeObject != _target)
                {
                    _target = Selection.activeObject as PlanetAsset;
                }
            }

            if (textureGenerator == null)
            {
                textureGenerator = new PlanetTextureGenerator();
            }

            textureGenerator._target = _target;
            textureGenerator.updatePreview();
        }