public void UpdateSpriteTexture() { if (UpdateSpriteMaterial() == false) { return; } NcSpriteFactory ncSpriteFactory = m_NcSpriteFactoryPrefab.GetComponent <NcSpriteFactory>(); ncSpriteFactory.UpdateNcSpriteTexture(m_nSpriteFactoryIndex, this); ncSpriteFactory.UpdateUvScale(m_nSpriteFactoryIndex, transform); m_EffectObject = ncSpriteFactory.CreateSpriteEffect(m_nSpriteFactoryIndex, transform); if (UpdateMeshUVs(new Rect(m_fOffsetX, m_fOffsetY, m_fTilingX, m_fTilingY)) == false) { // Debug.Log("m_Renderer.material"); renderer.material.mainTextureScale = new Vector2(m_fTilingX, m_fTilingY); renderer.material.mainTextureOffset = new Vector2(m_fOffsetX, m_fOffsetY); } }