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
1
Question by afromofu · Jul 25, 2012 at 07:31 AM · androidguitexttextmesh3dtext

3D Text (TextMesh) not updated/redrawn every frame (android only)

Hi.

When I try to change a TextMesh's text every frame on Android, the text that is displayed on the scene is sometimes not refreshed (redrawn?). Does anyone know why, and know a solution to this?

Conditions:

  • This doesn't happen on PC. (I did not test on iPhone)

  • textMesh.text correctly returns the text that should be displayed. (it's just not drawn)

  • This doesn't happen with GUIText.

Smallest sample project: Uploaded here.

This is just a simple scene with a camera, a 3D Text and a GUIText. When you touch the screen, the text is changed each frame during the next 10 frames.

  • On Android: the text is correctly displayed for GUI text, but not for 3DText.

  • On PC: no problem for both.

This is the script used to update both texts:

 using UnityEngine;
 using System.Collections;
 
 public class NewBehaviourScript
  : MonoBehaviour
 {
  int _currentVal;
  int _targetVal;
  
  void Start ()
  {
  _currentVal = 0;
  _targetVal = 0;
  }
  
  bool _HasTouched()
  {
 
 #if UNITY_EDITOR
  return Input.GetMouseButtonDown(0);
 #else
  if (Input.touchCount == 0)
  return false;
  TouchPhase phase = Input.GetTouch(0).phase;
  return phase == TouchPhase.Began;
 #endif
  
  }
  
  // Update is called once per frame
  void Update()
  {
  if (_HasTouched())
  _targetVal += 10;
  
  if (_currentVal < _targetVal)
  _currentVal++;
 
  TextMesh textMesh = gameObject.GetComponent<TextMesh>();
  if (textMesh != null)
  textMesh.text = _currentVal.ToString() + "%";
  GUIText guiText = gameObject.GetComponent<GUIText>();
  if (guiText != null)
  guiText.text = _currentVal.ToString() + "%";
  }
 }


textmeshissue.zip (242.1 kB)
Comment
Add comment · Show 3
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 afromofu · Jul 26, 2012 at 01:28 AM 0
Share

Posted it on Feedback as it seems to be a bug for me

http://feedback.unity3d.com/unity/all-categories/1/hot/active/textmesh-not-updated-bug-or-

avatar image Eric5h5 · Jul 26, 2012 at 02:42 AM 0
Share

Unity Feedback is for feature requests, not bug reports. Use the bug reporter for that.

avatar image afromofu · Jul 26, 2012 at 03:36 AM 0
Share

I didn't know we could report bugs. Thanks for the information Eric5h5.

0 Replies

· Add your reply
  • Sort: 

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

7 People are following this question.

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

Related Questions

3D text with box collider Android 1 Answer

2D Game - GUIText doesn't shake with the camera 0 Answers

TextMesh doesn't work on HTC One X 0 Answers

HELP! TextMesh Pro not working for Android after upgrading from 2018.2 to 2018.4 (NullReferenceException at TMPro.TMP_Settings.get_defaultStyleSheet() ) 1 Answer

Trigger the dialogue system 1 Answer


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