Giter VIP home page Giter VIP logo

Comments (5)

KurtGokhan avatar KurtGokhan commented on June 26, 2024

Can you provide the following information?

  • What is the React code used to generate this behavior?
  • How are you providing the image source? If it is an asset inside Unity, what are your import settings? Can you send that asset and its .meta file? (Some compression, mipmap or filter mode settings can cause this behavior)
  • Does this happen without ReactUnity? Can you try creating a simple UGUI image and try to reproduce it?

from core.

Carln02 avatar Carln02 commented on June 26, 2024
  1. The code is quite long, but if I run the following in the index file:
import picture from "src/assets/icons/--primary-main/star-filled.png";
export function App() {
   return (<image source={picture} style={{width: '100px', height: '100px'}}/>);
}
Renderer.render(<App />);

I get the same pixelated output:
Screenshot 2023-01-21 173225

  1. Can I access images from the "Assets" folder? Whenever I try to input a path that goes outside the "src" folder in the react project I get an error. The image is placed inside this src folder and it doesn't have a .meta file.

Here is the asset:
star-filled

  1. If I place the same image as a 2D sprite in Unity it looks perfectly fine.

And thank you so much for the help!

from core.

KurtGokhan avatar KurtGokhan commented on June 26, 2024

I see. Image imports from file are imported with some default settings. I changed those settings to maximize quality now.

Fixed on main branch. I won't release a new version urgently as the problem only exists in development. In build, you have to go to the build folder and modify image import settings manually anyway.

from core.

Carln02 avatar Carln02 commented on June 26, 2024

Oh okay great!! Thank you for your help :)

from core.

KurtGokhan avatar KurtGokhan commented on June 26, 2024

Forgot to update, this is already fixed in 0.14.2

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.