Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Catsby · May 23, 2011 at 03:11 PM · buildbugstringstudent

Build altering strings.

Hey everyone,

I'm running into a strange problem where all the strings have their spaces removed when I build the game into an executable for windows or .unity3d for browsers. For example a string with the characters "This is a String" turns into "ThisisaString". Is there something important I missed in a tutorial somewhere?

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 Statement · May 23, 2011 at 04:15 PM 0
Share

Are you using some custom fonts or custom skins?

avatar image Graham-Dunnett ♦♦ · May 23, 2011 at 08:26 PM 0
Share

As statement says, does the font you use actually have a space character defined? Or maybe the space is extremely narrow. If you print hello(100 spaces)world do you get hello and world separated by some space?

avatar image Catsby · May 24, 2011 at 03:31 PM 0
Share

Yes I'm using custom skins and never even thought that would be the problem. When I run the game in the editor it works fine but when I build it and run it on a different computer that's when it messes everything up. I'll poke around and see if the spacing is the problem.

avatar image Catsby · May 24, 2011 at 04:49 PM 0
Share

I found all the options in the GUIskin. It says it's a script but I can't open it to look at it. I can only change value in the editor. What would an option for character spacing be called and why is the value changing during build but everything else remaining the same?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Joshua · May 23, 2011 at 03:20 PM

I would definitely need additional information to be able to help you. Spaces should definitely appear in strings. For instance

 function OnGUI () { GUILayout.Label ( "Hello World"); }

Should put Hello(space)World on the top left corner of your screen. Could you check if that at least works to make sure it's something odd you did inside you script?

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 Catsby · May 23, 2011 at 03:46 PM 0
Share

Building seems to affect all strings that end up on the GUI. Here's one of my GUI.Labels

 GUI.Label(Rect(welpos.x,welpos.y,welsize.x,welsize.y),"" + welmes);

where welmes is a welcome message.

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

2 People are following this question.

avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

UI images and text tearing and deforming 1 Answer

Localization via script works in editor but not in build, why? 1 Answer

Things/features not available on android 0 Answers

Mouse cursor is giant in Mac builds. 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