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 jshrek · Mar 23, 2015 at 05:16 AM · unityeditorbundleplayersettingsidentifier

How to use PlayerSettings.bundleIdentifier in final build?

So I have the following in one of my scripts: Code (CSharp):

 string bID = PlayerSettings.bundleIdentifier;

When I first tried to use it, I got the following error: Code (csharp):

 error CS0103: The name `PlayerSettings' does not exist in the current context

In order to get rid of this error, I needed to add the following at the top of the script: Code (CSharp):

 using Unity.Editor;

This works great in the Editor, but when I try to build for iOS I get the following error: Code (csharp):

 error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?

So I tried wrapping it like this: Code (CSharp):

 #if UNITY_EDITOR
 using UnityEditor;
 #endif

Still works in Editor just fine, but when I try to build for iOS I still get one of the above two errors.

I have searched forum but cannot figure out how to get around this.

If you cannot include "using Unity.Editor" then what is the point of even having something like PlayerSettings?

Any advice to get this working appreciated.

Thanks

Comment
Add comment · Show 1
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 jshrek · Mar 29, 2015 at 06:42 PM 0
Share

Anybody have any ideas?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Sohaib_techverx · Nov 06, 2020 at 11:21 AM

Hi,

I know this is an old post but did you find any solution for this?

Thanks, Sohaib

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

MMD How to export model and animations to Unity as 3rd person controller? 2 Answers

Changing Bundle Identifier crashed the App on start? 0 Answers

help -- cannot set bundle identifier values 2 Answers

how to disable android tv compatibility in player settings 2 Answers

How to get this string to change values for each button at runtime? 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