// Creates a new sprite settings with the given texture. // If the a_bPhysic argument is set to true, the settings will // depict a physical sprite public Uni2DEditorSpriteSettings(Texture2D a_rTexture2D, bool a_bPhysic = false) { this.textureContainer = new Texture2DContainer(a_rTexture2D, true); atlas = Uni2DEditorUtils.FindFirstTextureAtlas(textureContainer.GUID); // Set physic mode accordingly to given argument this.physicsMode = a_bPhysic ? PhysicsMode.Dynamic : PhysicsMode.NoPhysics; }
// Set default atlas public void SetDefaultAtlas() { m_rSpriteSettings.atlas = Uni2DEditorUtils.FindFirstTextureAtlas(m_rSpriteSettings.textureContainer.GUID); }