public void AddTextureUnitState( TextureUnitState state )
{
textureUnitStates.Add( state );
if ( state.Name == null )
{
// it's the last entry in the container so it's index is count - 1
state.Name = ( textureUnitStates.Count - 1 ).ToString();
// Since the anme was never set and a default one has been made,
// clear the alias name so that when the texture unit name is set
// by the user, the alias name will be set to that name.
state.TextureNameAlias = null;
}
// needs recompilation
_parent.NotifyNeedsRecompile();
DirtyHash();
}