Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Hi, please need your help :) => change Image source . Image in runtime

Discussion in '2D' started by Req2019, May 5, 2019.

  1. Req2019

    Req2019

    Joined:
    Apr 18, 2019
    Posts:
    2
    Hi

    thank you in forward for your help.

    I am new in unity and scripting and try to learn it so sorry for my question if its for you easy :)

    So what I want to do is:

    I have one scene whit one button (left upper corner) an one image place in the middel on the scene.
    So when i push the button i want to change the image1 to another image2 in runtime.

    Like : Image source . Image1 = image2

    please can you help me with the script ?

    Thank very much :)
     

    Attached Files:

  2. jc-drile77

    jc-drile77

    Joined:
    Jul 1, 2014
    Posts:
    229
    Yes we can help you, and it is actually an easy script. But please provide your attempt before requesting something, the best way to learn is trying and failing :)
     
  3. Req2019

    Req2019

    Joined:
    Apr 18, 2019
    Posts:
    2
    Hi jc-drile77

    thank you ver ymuch for you replay :)

    I will try and also looked online in google and youtube, but I found only solutions where only the same Image is changing in run time. So i need a small push in the right direction if possible :)

    Thank you.
     
    Last edited: May 6, 2019