Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by Izzy4me · Oct 09, 2014 at 01:46 PM · display2dtexture

Dynamically displaying 2D textures above 3D objects

Hello. I have been working with that few hours during 2 days and I can't get what I wanted. And what I wanted? Something like gif above object (3 textures with phone and growing signal). I need visual effect of calling for reinforcement when enemy looks at player. It's my visualization:

 void Preparing(){
      radioTexture1.enabled = false;
      radioTexture2.enabled = false;
      radioTexture3.enabled = false;
    }
    IEnumerator Calling(){
      informing = false;
      for (int i=0; i<3; ++i) {
        Debug.Log("I'm working! iteracja " + i);
        radioTexture3.enabled = false;
        radioTexture1.enabled = true;
       
        yield return new WaitForSeconds (0.5f);
        radioTexture1.enabled = false;
        radioTexture2.enabled = true;
       
        yield return new WaitForSeconds (0.5f);
        radioTexture2.enabled = false;
        radioTexture3.enabled = true;
        yield return new WaitForSeconds (0.5f);
        radioTexture3.enabled = false;
       
      }
    }

radioTextures 1-3 are GUITexture empty objects with simple texture (childs of my enemy, local position (0,2,0). Any suggestions? I'm going mad, it looks so simple ;_;

I was trying

 transform.FindChild("RadarSignalTexture1").position = Camera.main.WorldToViewportPoint(transform.position + 2*Vector3.up);

and it didn't worked. When I created separate script and using similiar construction in child, it works (but texture is flying in each direction when I'm a bit far from enemy) and I can't have 3 scripts in this situation and enabling and disabling each other after 0.5s. It's a bit stupid... Please help :)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by _dns_ · Oct 09, 2014 at 02:30 PM

Hi, using sprites instead of GUITexture might be a better solution. Did you check Unity's team free project/tutorial to see how they do similar things. Example: https://www.assetstore.unity3d.com/en/#!/content/11228

Comment
Add comment · Show 1 · 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
avatar image Izzy4me · Nov 08, 2014 at 10:06 PM 0
Share

I saw them using sprites in 2D. It is possible to render sprites by SpriteRenderer, animate them (bool star as flag to start animation, then time and next frame of animation; everything looped for few cycles) in 3D, over the head of object?

I realy wanted effect like this: http://img2.wikia.nocookie.net/__cb20100328111233/prototype/images/c/cd/Prototype_Past_Present_Radio-1-.png
but I can't even draw picture over head without using OnGUI :/ Anyone can help me and show path to good solution?

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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Animation not showing when close up 1 Answer

Bug when hiding resolution Dialog? (Settings get reset on startup) 3 Answers

How to fix display 5 Answers

Loading a Model 1 Answer

Something is missing in my code can any body help me? 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