Questions in topic: "identifier" The latest questions for the topic "identifier" Unity 2018 is not adding bundle identifier in Xcode Build Settings On building ios xcode project through unity, value for product bundle identifier is not set in the build settings tab in xcode. This is causing the error 'Add App Groups to your App ID' inspite of adding the app-group to the correct app ID on enabling App Groups. Please let me know if I could fix this somehow? error ios xcode identifier groups Tue, 30 Apr 2019 15:23:39 GMT ashwin_dinesh Remember user between Installs Hello, I was just wondering if there is a method for remembering user between installs? Say a user gets the game/app plays for a bit then deletes it, some time passes but they pick it up again. What methods are being used if any to identify these users? I have thougth about using **SystemInfo.deviceUniqueIdentifier** but after reading about people finding duplicates I am not too keen on using that as the main and only way to differentiate between users. Any and all thougths on this are welcome. Thanks identifier Tue, 16 Apr 2019 18:46:28 GMT Bciam Is there any way to get Application.identifier on WindowsPlayer? Built unity sample project on StandaloneWindows. Btw, When getting Application.identifier on run time, the value is empty. There is no problem on Editor mode, android and iOS. I couldn't find any thing related to this issue by using googling. [MenuItem("Build/Standalone Release")] static void BuildMenuReleaseStandalone() { PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Standalone, "fi.myapp.sample"); if (BuildPipeline.isBuildingPlayer) { Debug.LogError("Already building!"); return; } var buildPlayerOptions = new BuildPlayerOptions(); buildPlayerOptions.options = BuildOptions.AllowDebugging; = BuildTarget.StandaloneWindows; buildPlayerOptions.locationPathName = "Test.exe"; buildPlayerOptions.scenes = new[] { "Assets/Main.unity" }; string errorResult = ""; if (buildPlayerOptions.locationPathName != "") { errorResult = BuildPipeline.BuildPlayer(buildPlayerOptions); } if (errorResult.Length > 0) { Debug.LogError(errorResult); } } ![alt text][1] [1]: /storage/temp/135288-application-identifier.png identifier Mon, 25 Mar 2019 11:09:51 GMT piacol Changing Bundle Identifier crashed the App on start? Hello! I am developing an Android app. I am using the NFC reading. When I try to change the Bundle Identifier from com.Company.ProductName to anything else (like my app name), after installation it says "Ap could not be opened" and crashes it. When the Identifier is default, it works like a charm. What can be wrong? bundle identifier Thu, 30 Nov 2017 13:01:33 GMT Vel_1828 what do i provide in bundle identifier? i am developing a android 2-D game in unity but do not have website and not planning to have one recently. so what should i put in the bundle identifier?is it absolutely must for independent developers to have a website? bundle identifier Sat, 16 Sep 2017 10:27:35 GMT indiakc1992 I'm getting an error CS1041: Identifier expected for my script? So I'm following this person's script for AudioFadeOut: and I'm going through and fixing the errors that pop up but one has me stumped. **Assets/Scripts/AudioFadeOut.cs(6,44): error CS1041: Identifier expected** This is what my current script looks like: using UnityEngine; using System.Collections; public static class AudioFadeOut : MonoBehaviour { public static IEnumerator FadeOut (AudioSource, float FadeTime) { float startVolume = AudioSource.volume; while (AudioSource.volume > 0){ AudioSource.volume -= startVolume * Time.deltaTime / FadeTime; yield return null; } AudioSource.Stop (); AudioSource.volume = startVolume; } } Now I know that there's something wrong with line 6 that's causing this error but no matter what I try, this one is very stubborn. Can a pro point out where I've gone wrong or what I've missed here? I would greatly appreciate any and all help :) c# audiosource fadeout identifier Thu, 15 Jun 2017 04:23:48 GMT CraftyMaelyss holding references inside ScriptableObjects or identifiers (int) ? Let's imagine this scenario (Invented): I have a class that is *Level*. This class contains information for the levels, like difficulty, enemy spawn ratio or whatever. then I have a ScriptableObject that has a list of Sprite-Level relation, as in which sprites will appear in the level. this scriptable object is just an array of *LevelSpriteRelation*, which holds a level reference and a textureid or gameobject instance ID. Now my question is... should it be better to have unique ID's for Level and hold only integers inside the scriptable object? Then I guess a Manager would have an array of levels to find by id Holding a reference is easier, but I would like to know if there is any cons on doing that, like garbage, leakage or more. reference scriptableobject leak identifier garbage Wed, 25 Jan 2017 13:06:06 GMT AlexTemina Google Ads Plugin - a Bundle Identifier problem Hello! In my project stopped working Google ads. Try new project - ads show normaly. I searching problem in all project: in manifest, plugin's, and even deleted all files from project and then imported google ads plugin... no result - advertising is not displayed. So i find that if i edit my Bundle Identifier - ads work fine, but if i use Bundle Identifier of my project - ads don't show. Maybe someone faced a similar problem... please help! Or, if you have any ideas on this subject - I will be very happy to see any tips. Thanks! android ads google bundle identifier Tue, 17 Jan 2017 14:45:17 GMT SergeLypii Give Audio Clip From Array A Unique I.D. Is there a way to give an audio clip from a specific array of audio clips a unique I.D. that I could reference from other clips or save to player prefs? c# audio playerprefs id identifier Thu, 12 Jan 2017 21:01:01 GMT KnightRiderGuy Get which player collided with an object Hello, I'm writing a multiplayer game where, at some point, two players (or more) must touch an object and the fastest wins the round. I have a Collider object containing my Player GameObject, but how do I know if this player is player 1 or player 2 ? This has to be scalable for more than 2 players. I know I could use List.findIndex() but I have no idea how to compare GameObjects and, by extension, no idea on how to make a predicate. public class GameController { public List<GameObject> players; // Can change for a Dictionary<int, GameObject> if needed [...] protected void totemTouched(Collision coll) { int touchedBy = /*id of the player that touched the totem*/; if(legitimateTouch(players)) { win(touchedBy); } else { lose(touchedBy); } } } lists identifier Sat, 10 Dec 2016 21:01:53 GMT bethouxa How to get IMEI on Android Hi, I need to get the phone IMEI in my Unity Android app. Until now I used the following code and it worked well, automatically asking for phone calls permission during installation (that's ok for my app). try { string imei = SystemInfo.deviceUniqueIdentifier; if (Application.platform == RuntimePlatform.Android) { AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject activity = jc.GetStatic<AndroidJavaObject>("currentActivity"); AndroidJavaClass contextClass = new AndroidJavaClass("android.content.Context"); string TELEPHONY_SERVICE = contextClass.GetStatic<string>("TELEPHONY_SERVICE"); AndroidJavaObject telephonyService = activity.Call<AndroidJavaObject>("getSystemService", TELEPHONY_SERVICE); bool noPermission = false; try { imei = telephonyService.Call<string>("getDeviceId"); } catch (System.Exception e) { noPermission = true; } } Debug.Log("IMEI: " + imei); } catch(System.Exception exc) { Debug.Log(exc.ToString()); } Recently - i guess when i switched to Unity 5.4 - I noticed the app is no longer asking for phone calls permission and in fact now the previous code isn't able to get the IMEI. How can I solve that? As I said I've no problem asking for the "infamous" phone calls permission, so how can I retrieve it? Any other suggestions appreciated! Thanks, Riccardo android identifier Sun, 27 Nov 2016 08:15:01 GMT dmoroni Unknown Identifier SceneManager/Obsolete Application.LoadLevel #pragma strict if(Input.GetKeyDown(KeyCode.Alpha1)||Input.GetKeyDown(KeyCode.Keypad1)){ SceneManager.LoadScene(1); } if(Input.GetKeyDown(KeyCode.Alpha2)||Input.GetKeyDown(KeyCode.Keypad2)){ Application.Quit(); } When I use Application.LoadLevel, it's obsolete. SceneManager is unknown. Why!!! scene-loading application.loadlevel identifier unknown unknown identifier Tue, 11 Oct 2016 05:22:12 GMT Nova-1504 Unknown Identifier when trying to load a new scene with a script. So, I recently began using Unity and I have been creating small projects, and now I want to add a main menu. I finished making it, got a script to load my 2nd scene (the game itself, from the main menu) and it gives me "Unknown Identifier 'SceneManager' and whenever I change it, it still gives it to me. any way to fix this? I also provided the code in the post. `#pragma strict function OnTriggerEnter (other : Collider){ if (other.gameObject.tag == "Finish"){ %|-139535910_2|% ` } } Hope you can help :) Kind regards /EC javascript identifier need unknown-identifier pragma strict Wed, 24 Aug 2016 17:31:00 GMT EpicCreator222 Unobtrusively ID player across all devices on a platform I'm trying to find the most unobtrusive way to ID a player based off of the platform they're using. If they get my free app from the Android or iOS app stores, my app need tohave some kind of ID associated that links that player with the app store, and therefore that platform. I want to do this so my app uses the same ID for them even if the player gets a new phone or plays on a tablet. I'd use the ID for both game restores and a custom leaderboard that shows rank and score, I have no need to display names. Is there an unobtrusive way to get a platform specific ID? **What I have so far:** Google Play Game Services for Unity seems too obtrusive. If I forced people to sign in to Google Play Game Services just to play my little game, they simply wouldn't play. I'd much rather have a way unobtrusive enough that I can require the ID it without player fear. Using native Android functionality, I was thinking if they quickly pick their email address from a list it'd be okay, but `AccountManager.get(context).getAccounts()` requires adding `android.permission.GET_ACCOUNTS` which creates a popup after install request that my app has access to read/writing to all their contacts. The best I've come up with is using the `transactionID` associated with an IAP `UnityEngine.Purchasing.Product` to use as a cross device UserID. The problem is, `transactionID` would only exist if an IAP purchase is made. Leaving the likely majority of my users ID-less. I could have the free loaders use `SystemInfo.deviceUniqueIdentifier`, they'd just miss out on cross-device restore functionality. I'd rather give everyone the same functionality and not have to deal with 2 kinds of ID's. Is there any kind of "customer ID" that I can unobtrusively get in Unity without the user making an IAP purchase? id identifier Tue, 02 Aug 2016 01:15:00 GMT ShawnFeatherly Can someone help me with my scrip i can't get it to work im trying create primitive and non-primitive objects. using UnityEngine; using System.Collections; public class LoopsAndArrays1 : MonoBehaviour { private Vector3 randomPosition; private Vector3 offset; public static GameObject CreatePrimitive(PrimitiveType type); // Use this for initialization void Start () { // Create a Cylinder GameObject cylinder = GameObject = CreatePrimitive (PrimitiveType.Cylinder); // Origin via Script cylinder.transform.position = new Vector3(0, 2, 0); // Dimensions of Cylinder float height = cylinder.GetComponent<Renderer>().bounds.size.y; Debug.Log ("Cylinder Height = " + height); float width = cylinder.GetComponent<Renderer>().bounds.size.x; Debug.Log ("Cylinder Width (Diameter) = " + width); Debug.Log ("Cylinder Dimensions = " + cylinder.GetComponent<Renderer> ().bounds.size); //Generate a Random Position --> output to file (2 & 3) Vector3 randomPosition = new Vector3( Random.Range(-10, 10), Random.Range(-10, 10), Random.Range(-10,10)); } // Create a cube at a random position. GameObject cube = GameObject = CreatePrimitive (PrimitiveType.Cube); //Cube generated in a random position. cube.transform.position = randomPosition GameObject (Cube); = myGameObject; offset = new Vector3 (2, 2, 2); // A row of Cubes along the x-axis for(int i=0; i>5; ++i); // create a cube GameObject = GameObject.CreatePrimitive(PrimitiveType.Cube); Vector3 position = offset + new Vector3 ( i*(myCube.GetComponent<Renderer>) 0, 0); } error identifier unexpected-symbol expected Mon, 18 Jul 2016 05:36:50 GMT jalal231 Vector3 not an identifier? I am trying to write a function that finds a point on a Bezier curve. I need it to output a vector 3 co ordinate however it keeps giving me an error saying "identifier expected". Isnt the first phrase "Vector3" the identifier here!? heres a screenshot of some of the errors :/ ![alt text][1] //function to find point on curve Vector3 curveEquation(p0 : Vector3, p1 : Vector3, p2 : Vector3, p3 : Vector3, t : float) private Vector3 p4; private Vector3 p5; private Vector3 p6; private Vector3 p7; private Vector3 p8; private Vector3 p9; { p4 = Vector3.Lerp(p0,p1,t); p5 = Vector3.Lerp(p1,p2,t); p6 = Vector3.Lerp(p2,p3,t); p7 = Vector3.Lerp(p4,p5,t); p8 = Vector3.Lerp(p5,p6,t); p9 = Vector3.Lerp(p7,p8,t); return p9; } } [1]: /storage/temp/60973-screenshot-3.png vector3 function functions identifier Wed, 30 Dec 2015 21:28:45 GMT joshua-lyness UNET - Why is my NetworkInstanceID equal on both clients when receiving ClientRpc? Hi! I'm currently playing around with a simple chat system for my gamelobby. **My Setup:** I'm using HLAPI like so: //this is called on client within my LobbyPlayer class which inherits from LobbyNetworkPlayer public void SendMessage(string msg){ CmdSendChatMessage(msg, netId.Value); } //this should be triggered by the client, but executed by the server [Command] public void CmdSendChatMessage(string message, uint senderID) { Debug.Log("client "+senderID+" sent a message"); } //this should be triggered by the server but executed by the client [ClientRpc] public void RpcReceiveChatMessage(string message, uint senderID) { Debug.Log("client "+netId.Value+" received message from:"+senderID); } As you can see, I send the netId.Value of the respective sending player along with the message. I need this to determine which client sent the message, when another (or same) client receives it. **The problem:** My problem is best explained by an example: If client A triggers sending a message, the Server forwards the Message to client A and B, which is fine. However, both clients seem to have the same netId.Value upon receiving the message: //Output when client A sends a message: [Server]: Client 1 sent a message [A]: Client 1 received message from: 1 //this is expected [B]: Client 1 received message from: 1 //this should be "Client 2 received message from: 1" The same thing happens when client B triggers sending a message, but then the netId is 2 (on both clients). So it seems, both LobbyPlayers have different netIds, but when they receive the message from the server, their netId is the id of the sender. **The Question:** Why is that? Shouldn't it be like I expected? Or is there a better way to determine which player sent the message? Cheers, phineliner networking unity5 rpc lobby identifier Mon, 23 Nov 2015 17:04:16 GMT phineliner File.Create Not recognised So I am trying to save some data for my game and the console is showing this error: Any help to fix this issue will be appreciated. Below is the code: private var Class : String; function SetClass(c : String){ Class = c; } function SaveData(){ var bf = new BinaryFormatter(); var file = File.Create(Application.persistentDataPath + "/Data.b"); bf.Serialise(file, Class); } function Start(){ } serialization identifier Mon, 02 Nov 2015 03:07:20 GMT DoYouEvenDev Privacy: Can a compiled Unity game be linked to the author? When using Unity, you can login or work in offline mode. I'm wondering if anybody knows if there is anything in a compiled Unity game (desktop and mobile) that can link the game to the author/compiler? Obviously if you put your name or company in there (eg, package name, splash image etc) or distributed some identifying files with the game you could, but I'm thinking more about anything that is hidden away in Unity or MonoDevelop that isn't obvious. Perhaps some metadata is compiled into the code with an identifier that could be traced? There are two reasons I'm thinking of that this could be important: 1. An original author/compiler could prove (albeit, tenuously) that the game was made by them 2. A game made as political/corporate satire could be traced back to the author/compiler by a not so friendly government/employer compiling private identifier privacy policy Tue, 27 Oct 2015 11:55:12 GMT Austhailia How do I resolve script issues with Unity, I am currently getting a "Unknown identifer" & Non static Acess member issues. Currently i cant progress with my scripts using Java for unity 5 development, as the following two issues are appearing: Assets/Scripts/CoinSystem.js(18,4): BCE0005: Unknown identifier: 'elseif'. BCE020: Assets/Scripts/CoinCollecter.js(3,16): BCE0020: An instance of type 'CoinSystem' is required to access non static member 'coinscollect'. I have attached a copy of the scripts in question: Which is trying to achieve three goals 1. Create three GUI labels (one to display collected coins), one to display coins remaining and the other is to tirgger a game over screen or text to occur. 2. add the score of the coin by a value (ie. adding to a score when a coin is picked up. 3. To make the coins add to the coins collected (ie when collected coins goes to 1). thanks for any help or any information that may help to resolve the problem :). javascript scripting problem instance identifier Tue, 15 Sep 2015 12:36:28 GMT Cjduthie Identifier Expected: Public is a keyword What does this mean? here is my code: using UnityEngine; using UnityEngine.UI;// we need this namespace in order to access UI elements within our script using System.Collections; using UnityEngine.Internal public class pause : MonoBehaviour { public Canvas PauseMenu; public RawImage PauseScreen; void Start () { PauseMenu = PauseMenu.GetComponent<Canvas>(); PauseScreen = PauseScreen.GetComponent<RawImage> (); PauseMenu.enabled = false; } void Update (){ if(Input.GetKeyDown("p")) { PauseMenu.enabled = true; FirstPersonController.enabled = false; } if (Input.GetKeyDown ("Esc")) { PauseMenu.enabled = false; FirstPersonController.enabled = true; } } } I'm currently attempting a pause screen for my game, but it won't work.... why is this? Thanks! c# play noob pause menu identifier Sun, 13 Sep 2015 09:42:53 GMT Zanyblax access user-entered ID across my mobile apps I plan to conduct research that needs to associate use data for five of my iOS and Android apps with the study participant's study ID #. Is there a way to save the study ID number so that it can be retrieved by each app? In other words, I would like to create a small Study ID Registration app that participants use simply to enter their study ID #. Then whenever they open any of the 5 apps I am using in the study, I want those apps to be able to access that study ID number. Thank you! Carrie c# identifier Fri, 04 Sep 2015 14:44:56 GMT carriejill Please Help Very confused , I do not understand that for an error Targetting.cs(3,14):error CS1041: Identifier expected. Please tell me , where did I go wrong ? using UnityEngine; using System.Collections; using System.Collections.Generic; public class Targetting : MonoBehaviour { public List<Transform> targets; // Use this for initialization void Start () { targets = new List<Transform>(); AddAllEnemies(); } public void AddAllEnemies() { GameObject[] go = GameObject.FindGameObjectsWithTag("Enemy"); foreach(GameObject enemy in go) AddTarget(enemy.transform); } public void AddTarget(Transform enemy) { targets.Add(enemy); } // Update is called once per frame void Update () { } } c# error void identifier Thu, 02 Jul 2015 20:21:18 GMT Gashinman Unknown Identifier: 'CrossPlatformInputManager' Hello. I have this error stated in the question, and I am wondering why I am recieving this. I'm trying to add the joystick controller from the standard assets, but when I try to reference to the .getAxis("Horizontal") I get this error. I've learned that usually this means that my script can not access the CrossPlatformInputManager, but I'm also aware that I do not need to import that class because it is under Unity's Assets folder. Here is my code: Classname = followCenter.js function Update() { var axis = CrossPlatformInputManager.GetAxis("Horizontal"); Debug.Log(axis); } The only thing I can think off is that this script (which contains the Update function) is in JS and CrossPlatformInputManager is in C#. Thanks for helping me out! NeusAap joystick identifier Sat, 13 Jun 2015 19:03:43 GMT NeusAap Unknown identifier: 'ObjectNames'. Hey all, just wondering if somebody would be kind enough to help with an old project I'm revisiting, I'm sure it was working before many years ago, but it can't seem to find the ObjectNames identifier now... Thanks in advance! var prefab : GameObject; var amount : int; var name; function Update () { var position: Vector3 = Vector3(Random.Range(-2.5, 2.5), Random.Range(-2.5, 2.5), -1.5); if (amount>0){ Instantiate(prefab, position, Quaternion.identity); Debug.Log(amount); amount.ToString(); ObjectNames.SetNameSmart(prefab.gameObject,("prey"+amount)); amount--; }} javascript gameobject identifier Tue, 19 May 2015 19:56:16 GMT JShrewey How do I use custom identifiers? Ok so the question is related to the following problem in C#. It's not a 'my code doesn't work' question, rather a 'which way am I supposed to do this' question. I have a GameObject which contains data for four players: ScriptA int player01Value; int player02Value; int player03Value; int player04Value; What I need to do is fetch one of these for use in another script, but we don't know which one until later. ScriptB void someMethod() { private string fullString; private int playerNumber = //a number I get from somewhere. // An int between 01 and 04. In this case 01 fullString = "player" +playerNumber +"value"; // fullString is now: "player01value" GetTheInfo(fullString); } void GetTheInfo(string whichPlayerValue) { int aPlayersIntValue = ScriptA.(whichPlayerValue); // as you can see, the identifier 'whichPlayerValue' needs to be defined during the game, since there are four players and we don't know which player's value we need until we are given the integer 'playerNumber'. The period and bracket identifier is obviously not working so I was wondering if somebody could suggest an alternative way to use fullString as the identifier. It would save me copying huge blocks of code just to change one number in each copy. We can't just Get the int from ScriptB because this is a much-simplified version of a much larger framework. If I get an answer how to do what I'm asking it would be very much appreciated. identifier Sun, 03 May 2015 19:34:51 GMT Stephanie-The-Viking 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 unityeditor playersettings bundle identifier Mon, 23 Mar 2015 05:16:59 GMT jshrek SystemInfo.deviceUniqueIdentifier changed for many devices Hello all, We have urgent and very critical issue in our application. After we updated our game from Unity 4.5.5 to 4.6.2 many clients has changed their client ids (SystemInfo.deviceUniqueIdentifier): and many users get the following ID: cd9e459ea708a948d5c2f5a6ca8838cf this is md5 string from the following: 00000000000000000000000000000000 (32 zeros). Because of this many people lost their save data (we use client id in keys). Is there any chance for quick fix to restore SystemInfo.deviceUniqueIdentifier? identifier Tue, 17 Feb 2015 10:47:49 GMT LeonardK Unknown Identifier I set the variable in the start function and then it says that it doesn't know it in the update function? #pragma strict //dwn = 0, right = 1, up = 2, left = 3. var Facing : int; function Start () { var anim = GetComponent("Animator"); } function Update () { if(Input.GetAxisRaw("Vertical") > 0){ anim.SetBool("Walking", true); } } variable getcomponent identifier unknown-identifier Sun, 07 Dec 2014 23:47:50 GMT TheBlip identifier expected im trying to create a health bar using a tutorial i found but at "public void AdjustcurHealth (adj)" it says identifier expected tutorial: [][1] help? UPDATE: ok i got that fixed but now i got a new problem it says Unexpected symbol `/' public class healthbar : MonoBehaviour { private int maxhealth = 100; public int curHealth = 100; private float healthBarLength; // Use this for initialization void Start () { healthBarLength = Screen.width / 2; } // Update is called once per frame void Update () { AdjustcurHealth(0); } void OnGUI (){ GUI.Box(new Rect(10,10, healthBarLength,20), curHealth.ToString "/" maxhealth.ToString); } public void AdjustcurHealth (adj) { curHealth += adj; if(curHealth > 0) curHealth = 0; if(curHealth > maxhealth) curHealth = maxhealth; if(maxhealth < 1) maxhealth = 1; healthBarLength = (Screen.width / 2) * (curHealth / (float)maxhealth); } } [1]: c# healthbar identifier Mon, 08 Sep 2014 06:24:06 GMT dylan760