• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ajridlen · Jan 23, 2016 at 09:32 AM · bugimageruntimecomponentdeleted

Why at run time does my images disappear from the script component but when I stop the run, it reappears?

I have not$$anonymous$$ng in my script that removes the Image from my message array. Before I $$anonymous$$t run it looks like t$$anonymous$$s: alt text

Then when I $$anonymous$$t run it does t$$anonymous$$s: alt text

When I stop it, it goes right back to normal. Absolutely not$$anonymous$$ng is being done in my script that would cause t$$anonymous$$s to happen. Why does it just ditch my two images? I delete the objects and its files then start over and it still does it. Any suggestions for the fix or reasons why?

help2.png (21.1 kB)
help1.png (27.1 kB)
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JedBeryll · Jan 23, 2016 at 10:00 AM 1
Share

I don't see why it would happen if you don't do it in your scripts. You should show the script anyway to be sure. Also are you sure that other scripts don't mess with these variables?

avatar image hexagonius · Jan 23, 2016 at 07:53 PM 1
Share

I agree with JedBeryll... I fiddled with prefabs and sprites and tried to reproduce this, but it must have something to do with code. One guess: Some = instead of == in some null check passage?

avatar image ajridlen · Jan 23, 2016 at 09:45 PM 0
Share

here is the variable in the script: alt text

and this is the only time it is touched in the script: alt text

I have no other scripts that accesses any of the messages. I am making just a canvas that holds different images that you can cycle through uses Left Arrow and Right Arrow for my game tutorial while in game.

variable.png (4.8 kB)
function.png (22.7 kB)
avatar image hexagonius ajridlen · Jan 23, 2016 at 09:58 PM 0
Share

Well, it doesn't make sense at all that Unity does it then. Have you tried applying to the current prefab, or create a fresh one? The bold entries tell me, that you're using one.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by MattGC · Jul 25, 2016 at 09:03 PM

@ajridlen Did you find a solution to t$$anonymous$$s?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

40 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to importing Image when game is running (Run Time) ? 1 Answer

Gameobject in scene but missing in hierarchy? 1 Answer

Would the Post Processing Stack still work if I were to add the behavior script to the camera GO at runtime? 0 Answers

Dynamic load of Image target - ARKit 0 Answers

Bug with change Image.sprite via script in 2019 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges