Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:23:25+00:00 2026-06-14T18:23:25+00:00

I am new to Unity 3D and I want to do just little task:

  • 0

I am new to Unity 3D and I want to do just little task: to set image on a Texture instance in Unity 3D. I don’t know how to do this at runtime, and I also would like to know how I set its transparency low.

I don’t need Texture2D – I just need Texture. My image is in .png format. I also want set an image from my documents directory on to this texture.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:23:28+00:00Added an answer on June 14, 2026 at 6:23 pm
    • First import your image into your project by simply dropping it in your project window.

    • Select the image once it’s in the project window and make sure that it is set to a Texture Type of Texture in your inspector.

    • Next, create a new material by right clicking in your project window.

    • Next you want to assign your image to this material and you can go about doing this by dragging and dropping your image (which is in the project window) on to your newly created material. In recent versions of Unity, you will need to drop it on the square to the left of "Albedo".

    • Then click on the new material and in your inspector window it should show you that your image is the active texture and the shader should be set to diffuse by default.

    • To activate transparency you’ll want to change the shader type by clicking on the shader drop down menu in the inspector window and selecting Transparent/Diffuse (or any of the transparency options depending on what look you’re going for).

    • After this to change it’s transparency, simply click on the main color swatch and there should be a new window that opens giving you all kinds of modifiers (with 4 horizontal sliders to adjust Red, Green, Blue & Alpha).

    • Adjust the Alpha slider to affect the transparency of your material.

    Now, whenever you need to make a call to your material at runtime (e.g if you wanted to change the texture applied to a gameobject), simply do so by using:

    renderer.material
    

    This will affect the material off the gameObject that the script is attached to. So for example, if you wanted to change the texture at runtime from script you could say:

    // Assign the texture exposed in the inspector the renderer's material
    
    var texture : Texture;
    renderer.material.mainTexture = texture;
    

    And if you wanted to change the alpha channel:

    renderer.material.color.a = 0 // For example
    

    Hope this helps. Let me know if anything needs clarifying.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just stumbled upon this: within a Unity container, I want to register IDictionary<TK,
Ok im new to javascript and Unity so this is clearly a very noob
I am new to Moq and want to use it not just in unit
I am just playing with Microsoft Unity 2 now, and need to know whether
I'm new with unit testing in visual studio and I want to load a
I am fairly new to Unity, (well, IoC and DI in general), and am
I am pretty new to Unity & IoC in general & as usual, I
I am new to unit testing, and would like to know how you would
I'm new to unit testing and NUit in particular. I'm just typing some examples
I've literally just started using the Unity Application Blocks Dependency Injection library from Microsoft,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.