• 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 marsking · Jun 19, 2011 at 08:33 AM · cs8025cs1519

Why have Chinese compile the script will fail???

Today, I set the platform for the PC AND MAC - when I wrote the following code - i get some error when i compile that. But when I put the platform to build the Web Player can also display Chinese ~ ~ Why does this child? All available platforms tested, only can be compiled only Web Play... Is there solution to it???

My English is poor, so sorry.

 using UnityEngine;
 using System.Collections;
 
 public class NewBehaviourScript: MonoBehaviour
 {
     //Use this for initializatio
     void Start ()
     {
     }
 
     //Update is called once per frame
     void Update ()
     {
     }
 
     void OnGUI ()
     {
         GUILayout.Label ("你好"); // = GUILayout.Label ("Hello");
     }
 }
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 ckfinite · Jun 19, 2011 at 11:13 PM 0
Share

What error are you getting on compile?

avatar image marsking · Jun 20, 2011 at 02:02 AM 0
Share

Error: Analytics Event: 5(Compiler*error CS1010*Newline in constant)(1): skipped because it was sent more than once in 0.10 seconds Assets/Script/Turnnel$$anonymous$$anager.cs(246,0): error CS1010: Newline in constant

(Filename: Assets/Script/Turnnel$$anonymous$$anager.cs Line: 246)

Assets/Script/Turnnel$$anonymous$$anager.cs(246,1): error CS1039: Unter$$anonymous$$ated string literal

(Filename: Assets/Script/Turnnel$$anonymous$$anager.cs Line: 246)

Assets/Script/Turnnel$$anonymous$$anager.cs(246,1): error CS1519: Unexpected symbol `' in class, struct, or interface member declaration

(Filename: Assets/Script/Turnnel$$anonymous$$anager.cs Line: 246)

Assets/Script/Turnnel$$anonymous$$anager.cs(246,1): error CS8025: Parsing error

(Filename: Assets/Script/Turnnel$$anonymous$$anager.cs Line: 246)

avatar image ckfinite · Jun 20, 2011 at 01:32 PM 0
Share

Okay, that means that @testure is correct.

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by testure · Jun 19, 2011 at 11:29 PM

Unity doesn't support unicode strings on OSX web player at the moment, you're going to have to use different characters.

Relevant: http://feedback.unity3d.com/pages/15792-unity/suggestions/310626

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
avatar image
0

Answer by areca_chen · Apr 27, 2012 at 09:14 AM

File -> save as -> Characte Coding(select 'Wstern') -> save -> select 'Overwrite file' -> "can't save file with current codepage' -> Save as Unicode -> recompile it

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

PLEASE HELP!!!! using BergZurgArcades guide having error! 5 Answers

Script Errors with C# 1 Answer

Whats wrong with this script? 1 Answer

unity 3d - c# scripting problems 1 Answer

5 Errors, Need help, Unexpected symbol private etc 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