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

                if (textureGenerator == null)
                {
                    textureGenerator         = new PlanetTextureGenerator();
                    textureGenerator._target = _target;
                }
            }
        }
		public void OnEnable()
		{
			if( target != _target )
			{
				_target = target as PlanetAsset;

				if( textureGenerator == null )
				{
					textureGenerator			= new PlanetTextureGenerator();
					textureGenerator._target	= _target;
				}
			}
		}
		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();
		}
        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();
        }