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 KKS21199 · May 30, 2015 at 05:25 PM · unity 5erroreditorwindowtry-catch

Try Catch Error Unity 5 EditorWindow

I have a editor window script which will make a error in the Console when displaying a long string in a label. I am trying to just catch this error and don't display it in the console. The string will be around 73K characters and is stored inside a variable in the script.

I just display that in the GUI to allow the user to copy it. What are the ways I could catch and just ignore the error. I don't want the error to be seen.

String too long for TextMeshGenerator. Cutting off characters. UnityEditor.EditorGUILayout:LabelField(String, String, GUILayoutOption[])

using c#

I tried the normal try{}catch(exception ex){} like I would in a WinForm App but it doesn't works.

I trimmed the string using substring, but what are the other ways of catching the error ? I have several other places where error might occur, but I don't want to display it in the Console.

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 umair.Em · Jul 08, 2015 at 10:49 AM 0
Share

I am having same Issue. did you find the solution already?

avatar image KKS21199 · Jul 08, 2015 at 10:58 AM 0
Share

Hey, no never did. I just had to work around the problem. $$anonymous$$ake a function to trim the number of characters to 100 if they are more than 100 and return it. (function should be a string). When outputting in in GUI, just pass the value through the function and it should be good. For other kind of errors, you can work through it in the same way (if object exists then proceed with function and etc)

avatar image umair.Em · Jul 09, 2015 at 11:12 AM 0
Share

umm I am not able to figure out that which game object is causing this error. But I have been told that its a Bug in Unity version 5.0.2f. which is fixed in later version. Reference Link

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

22 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

Related Questions

Unity 5's xCode build..... SUCKS? 1 Answer

Editor Window - GUI Error You are pushing more GUIClips than you are popping. 1 Answer

Reflections error please help!!! 1 Answer

Try Catch not working with VideoPlayer 2 Answers

Execute editor window scripts when project errors are present 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