Quantcast
Channel: Questions in topic: "exception"
Viewing all 470 articles
Browse latest View live

Try Catch not working with VideoPlayer

$
0
0
I am trying to play a video using Unity's VideoPlayer which I have attached to the camera. I want the user to be able to enter the file path of a local video file and the VideoPlayer should then play the video. I got this working fine but I can't seem to handle exceptions when the user enters a path that is not valid, for instance: try { videoPlayer.url = @"C:\blah"; } catch { print ("error"); } does not print "error" but instead continues execution and gives me an error in the console saying "Can't play movie [C:\blah]" ---------- I can't think of any reason why this error shouldn't be caught by using the try catch method. I am using the latest version of Unity. If you cannot use the try catch method to catch this exception, then I need a way to test if the url is valid and will play properly (e.g. the file is not corrupt)

Cannot set parent for instantiated GameObject. (Exception: Can't destroy Transform component of...)

$
0
0
I have player gameobject that is instantiated in the start of the game. I want to make pickable items to instantiate into the player gameobject's special zones (Marks), such as BowMark or QuiverMark. They are empty objects parented to the player gameobject rigs. The question is when i try to do that items gameobjects don't appear in the scene at all and after stopping editor playmode i have this exception: Can't destroy Transform component of 'weapon_bow_ShenMin02'. If you want to destroy the game object, please call 'Destroy' on the game object instead. Destroying the transform component is not allowed. Here is code sample: GameObject bowMark = GameObject.Find("BowMark"); GameObject in3 = (GameObject)Resources.Load ("Prefabs/FlameBowE"); GameObject in4 = Instantiate(in3, bowMark.transform); After few tests i figure out that problem is in parenting instantiated objects. Could anyone help with this situation please?

Directory Not Found Exception While Generating APK

$
0
0
DirectoryNotFoundException: Could not find a part of the path "Assets\Plugins\Android\appcompat-v7-23.1.1\res\color\abc_background_cache_hint_selector_material_dark.xml" or "Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\color\abc_background_cache_hint_selector_material_dark.xml" System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:124) UnityEditor.FileUtil.UnityFileCopy (System.String from, System.String to, Boolean overwrite) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:207) UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, Boolean overwrite, System.Func`2 includeCallback, Boolean recursive) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:142) UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, Boolean overwrite, System.Func`2 includeCallback, Boolean recursive) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:156) UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, Boolean overwrite, System.Func`2 includeCallback, Boolean recursive) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:156) UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, Boolean overwrite, System.String regExExcludeFilter, Boolean recursive) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:121) UnityEditor.FileUtil.CopyDirectoryRecursiveFiltered (System.String source, System.String target, Boolean overwrite, System.String regExExcludeFilter) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:102) UnityEditor.FileUtil.CopyDirectoryRecursiveForPostprocess (System.String source, System.String target, Boolean overwrite) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:97) UnityEditor.Android.PostProcessor.Tasks.NativePlugins.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186) UnityEditor.HostView:OnGUI()

Unity 2017.3 Android IL2CPP ArgumentNullException

$
0
0
Hello, I'm using too many external libraries in my project to check what causes this error and I can't figure out where this error actually comes from. Please help. :) It works fine with Mono, but with IL2CPP this happens:
01-12 15:44:00.330: E/Unity(13561): ArgumentNullException: Value cannot be null.
01-12 15:44:00.330: E/Unity(13561): Parameter name: method
01-12 15:44:00.330: E/Unity(13561):   at System.Dynamic.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.330: E/Unity(13561):   at System.Linq.Expressions.Expression.Call (System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].CreateCustomNoMatchDelegate (System.Reflection.MethodInfo invoke) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].MakeUpdateDelegate () [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].GetUpdateDelegate (T& addr) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T]..ctor (System.Runtime.CompilerServices.CallSiteBinder binder) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.Cal
01-12 15:44:00.340: E/Unity(13561): ArgumentNullException: Value cannot be null.
01-12 15:44:00.340: E/Unity(13561): Parameter name: method
01-12 15:44:00.340: E/Unity(13561):   at System.Dynamic.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.340: E/Unity(13561):   at System.Linq.Expressions.Expression.Call (System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].CreateCustomNoMatchDelegate (System.Reflection.MethodInfo invoke) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].MakeUpdateDelegate () [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].GetUpdateDelegate (T& addr) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T]..ctor (System.Runtime.CompilerServices.CallSiteBinder binder) [0x00000] in <00000000000000000000000000000000>:0
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.Cal

X.509 certificate exception "~isn't signed" but it really is signed

$
0
0
Hi, everyone! Could you please check this question? [https://stackoverflow.com/questions/48419314/x-509-certificates-exception-aws-iot][1] I'm trying to connect to AWS IoT MQTT broker with X.509 certificates and I get an exception saying CryptographicException. public AWSMqttManager() { //pfx fileName and password var clientCert = new X509Certificate2("C:\\Users\\UNO\\Desktop\\...\\ttc20.pfx", "ttc20"); var caCert = X509Certificate.CreateFromSignedFile("C:\\Users\\UNO\\Desktop\\...\\VeriSign-Class 3-Public-Primary-Certification-Authority-G5.pem"); client = new MqttClient(IotEndpoint, BrokerPort, true, caCert, clientCert, MqttSslProtocols.TLSv1_2); client.Connect("TTC-20"); } CryptographicException: C:\Users\UNO\Desktop\...\VeriSign-Class 3-Public-Primary-Certification-Authority-G5.pem isn't signed. System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile (System.String filename) (at <9c9f068c46c64ffd91fda7af157b4d15>:0) but the funny thing is the same code exactly works very well in pure c# project. That exception only occurs if I port that part of c# code onto unity project. Also the files (.pfx, .pem) do work for sure because I tested with MQTT.fx. They are fine. Please help me a little bit! Thanks in advance! [1]: https://stackoverflow.com/questions/48419314/x-509-certificates-exception-aws-iot

transform.find exception if child does not exist

$
0
0
Hi there, I need to find some GameObject children by their name. This work perfectly fine if the child I am searching exists. But if it does not exist, I get this exception:> NullReferenceException: Object> reference not set to an instance of an> object According to the Unity docs, I would expect transform.find to return null instead of throwing an exception. Any ideas? GameObject productContainer; // parent Object that contains several (or null) children GameObject item; item = productContainer.transform.Find("product1").gameObject; if (item == null) // this code is never reached - if "product1" does not exist an exception is thrown Debug.Log("Not found"); else Debug.Log("Found"); // this code works if "product1" exists Thanks in advance!

NullReferenceException with serialized array

$
0
0
Hello! I have a script with arrays of serialized objects like this: [Serializable] public class GenerationZones {public GeneratedObjecct [] GeneratedObjets = new GeneratedObjecct[100]; public int PositionX = -1; public int PositionZ = -1; public int State = 0; public int GeneradedObj = 0;} [HideInInspector] public GenerationZones [] GenZones = new GenerationZones[100]; When i hit play in a scene where the script is working everything is ok. But when i hit play in another scene and then i enter a scene with this script, it's not working. On every call to GenZones[n] (or any another same element) the game throws 'NullReferenceException: Object reference not set to an instance of an object'. What can be wrong?

TypeLoadException Error with Unity IAP,TypeLoadException Error when implementing Unity IAP

$
0
0
I am trying to implement Unity IAP into my mobile game. But, as soon as I finished my Purchaser script, I'm getting a TypeLoadException Error: TypeLoadException: Could not load type 'UnityEngine.Purchasing.NativeStoreProvider' from Assembly Stores, Version=1.0.6614.24906, Culture=neutral, PublicKeyToken=null. UnityEngine.Purchasing.StandardPuchasingModule.Instance() My error is in the line --> var builder = ConfigurationBuilder.Instance(...) public void InitializePurchasing() { if (IsInitialized()) { return; } var builder = ConfigurationBuilder.Instance (StandardPurchasingModule.Instance ()); builder.AddProduct(GEMS_100, ProductType.Consumable); builder.AddProduct(GEMS_400, ProductType.Consumable); builder.AddProduct(GEMS_800, ProductType.Consumable); builder.AddProduct(GEMS_1600, ProductType.Consumable); UnityPurchasing.Initialize(this, builder); } private bool IsInitialized() { // Only say we are initialized if both the Purchasing references are set. return m_StoreController != null && m_StoreExtensionProvider != null; } Thanks in advance

Is there any way to handle Exception without outputting as log.

$
0
0
Hi, I'd like to send message to server when exception occurred in release build. My code is below. class RuntimeInitialize { [RuntimeInitializeOnLoadMethod] static void OnRuntimeMethod() { #if DEBUG UnityEngine.Debug.logger.filterLogType = UnityEngine.LogType.Log; #else UnityEngine.Debug.logger.filterLogType = UnityEngine.LogType.Exception; #endif Application.logMessageReceived += OnLogRecieved; } public static void OnLogRecieved(string logString, string stackTrace, LogType type) { if (type != LogType.Exception) return; SendExceptionMessageToServer(logString, stackTrace) } } This code can send Exception message to server, but output message to Logcat simultaneously. How to stop outputting to Logcat ? Thanks.

Issue subscribing to event in managed DLL

$
0
0
Trying to subscribe to an event in a managed DLL digitalSigs.Change += handle_Change; Receive following error, and I don't understand what is meant by "non imported interfaces": NotSupportedException: non imported interfaces on imported classes is not yet implemented. (wrapper cominterop) DIGSigs.SignalEvents_Event:add_Change (DIGSigs.SignalEvents_ChangeEventHandler) (wrapper cominterop-invoke) DIGSigs.SignalEvents_Event:add_Change (DIGSigs.SignalEvents_ChangeEventHandler) Signals.Start () (at Assets/Scripts/Signal/SignalControl/Signals.cs:114) Any insight or a point in the right direction would be greatly appreciated!

Null Reference Exception

$
0
0
I want to write an Settings menu and I already created the UI but when I click on a button I get a null reference exception. NullReferenceException: Object reference not set to an instance of an object SettingsManager.SetResolutionHeight (Int32 height) (at Assets/Scripts/Options/SettingsManager.cs:36) UnityEngine.Events.InvokableCall`1[System.Int32].Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:189) UnityEngine.Events.CachedInvokableCall`1[System.Int32].Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:309) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:637) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:773) UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:52) UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261) UnityEngine.EventSystems.EventSystem:Update() Here is my Code This is my data class: public class Options_data { public int width, height; public bool fullscreen; public int textureQuality, antialiasing, vSync, shadowType, shadowResolution; public float masterVolume, musicVolume, surroundingVolume, battleVolume; } This is the class where I Change and set the values: using UnityEngine; using UnityEngine.UI; public class SettingsManager : MonoBehaviour { private Options_data data; public Slider[] musicSlider; public Toggle fullScreenToggle; private bool fullscreen = true; private int screenWidth = 1920, screenHeight = 1080; private void Start() { fullScreenToggle.onValueChanged.AddListener(delegate { SetFullscreen(); }); } public void SetTextureQuality(int idx) { data.textureQuality = QualitySettings.masterTextureLimit = idx; } public void SetResolution() { Screen.SetResolution(screenWidth, screenHeight, fullscreen, 60); } public void SetResolutionWidth(int width) { screenWidth = data.width = width; } public void SetResolutionHeight(int height) { screenHeight = data.height = height; } public void SetShadowType(int idx) { } public void SetShadowResolution(int idx) { } public void SetFullscreen() { data.fullscreen = fullscreen = fullScreenToggle.isOn; } public void SetAntiAliasing(int idx) { data.antialiasing = QualitySettings.antiAliasing = idx; } public void SetVSync(int idx) { } public void Apply() { } public void Revert() { } private void Update() { } } The Code is not finished Thanks for any help :)

,NullReferenceException Object reference not set to an instance of an object MechAttackMoveController.Awake () How do I fix this problem?

$
0
0
Hey there it's me Richard Haley once again just wanting to know how do I fix this problem it's NullReferenceException problem that say: NullReferenceException Object reference not set to an instance of an object MechAttackMoveController.Awake () (at Assets/Scripts/AI/MechAttackMoveController.js:31) here is the script that I have some one please please please do not ignore this ok so here is the script: 1#pragma strict 2 3// Public member data 4public var motor : MovementMotor; 5public var head : Transform; 6 7public var targetDistanceMin : float = 3.0; 8public var targetDistanceMax : float = 4.0; 9 10public var weaponBehaviours : MonoBehaviour[]; 11public var fireFrequency : float = 2; 12 13// Private memeber data 14private var ai : AI; 15 16private var character : Transform; 17 18private var player : Transform; 19 20private var inRange : boolean = false; 21private var nextRaycastTime : float = 0; 22private var lastRaycastSuccessfulTime : float = 0; 23private var noticeTime : float = 0; 24 25private var firing : boolean = false; 26private var lastFireTime : float = -1; 27private var nextWeaponToFire : int = 0; 28 29function Awake () { 30 character = motor.transform; 31 player = GameObject.FindWithTag ("Player").transform; 32 ai = transform.parent.GetComponentInChildren. (); 33} 34 35function OnEnable () { 36 inRange = false; 37 nextRaycastTime = Time.time + 1; 38 lastRaycastSuccessfulTime = Time.time; 39 noticeTime = Time.time; 40} 41 42function OnDisable () { 43 Shoot (false); 44} 45 46function Shoot (state : boolean) { 47 firing = state; 48} 49 50function Fire () { 51 if (weaponBehaviours[nextWeaponToFire]) { 52 weaponBehaviours[nextWeaponToFire].SendMessage ("Fire"); 53 nextWeaponToFire = (nextWeaponToFire + 1) % weaponBehaviours.Length; 54 lastFireTime = Time.time; 55 } 56} 57 58function Update () { 59 // Calculate the direction from the player to this character 60 var playerDirection : Vector3 = (player.position - character.position); 61 playerDirection.y = 0; 62 var playerDist : float = playerDirection.magnitude; 63 playerDirection /= playerDist; 64 65 // Set this character to face the player, 66 // that is, to face the direction from this character to the player 67 motor.facingDirection = playerDirection; 68 69 // For a short moment after noticing player, 70 // only look at him but don't walk towards or attack yet. 71 if (Time.time < noticeTime + 1.5) { 72 motor.movementDirection = Vector3.zero; 73 return; 74 } 75 76 if (inRange && playerDist > targetDistanceMax) 77 inRange = false; 78 if (!inRange && playerDist < targetDistanceMin) 79 inRange = true; 80 81 if (inRange) 82 motor.movementDirection = Vector3.zero; 83 else 84 motor.movementDirection = playerDirection; 85 86 if (Time.time > nextRaycastTime) { 87 nextRaycastTime = Time.time + 1; 88 if (ai.CanSeePlayer ()) { 89 lastRaycastSuccessfulTime = Time.time; 90 if (IsAimingAtPlayer ()) 91 Shoot (true); 92 else 93 Shoot (false); 94 } 95 else { 96 Shoot (false); 97 if (Time.time > lastRaycastSuccessfulTime + 5) { 98 ai.OnLostTrack (); 99 } 100 } 101 } 102 103 if (firing) { 104 if (Time.time > lastFireTime + 1 / fireFrequency) { 105 Fire (); 106 } 107 } 108} 109 110function IsAimingAtPlayer () : boolean { 111 var playerDirection : Vector3 = (player.position - head.position); 112 playerDirection.y = 0; 113 return Vector3.Angle (head.forward, playerDirection) < 15; 114} You can leave me a message at www.rb.haley@hotmail.com.

Unity test tools Excepted Exception error

$
0
0
I downloaded Unity Test Tools so that I could use NavMeshComponents and whenever I try to run or build my game, I get an error stating that "Are you missing an assembly reference?" because it can't find ExceptedException. Does anyone know how to fix this?

iOS build error after update to 2017.1.0f3

$
0
0
After update to Unity 2017.1.0f3 [occur in beta versions too], whenever I try to build an iOS project I get this errors: ___ > Failed running> /Applications/Unity/Unity.app/Contents/il2cpp/build/UnityLinker.exe> --api=NET_2_0_Subset -out=“/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/tempStrip” > -l=none -c=link --link-symbols -x=“/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml” > -f=“/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors” > -x “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/../platform_native_link.xml” > -x “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml” > -x “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/preserved_derived_types.xml” > -x “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Assets/FacebookSDK/link.xml” -d >“/Users/Pandora/DEVELOP/Bushido Renew > - iOS 2017.2b5 copy/Temp/StagingArea/Data/Managed” -a >“/Users/Pandora/DEVELOP/Bushido Renew > - iOS 2017.2b5 copy/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/Facebook.Unity.Settings.dll” > -a “/Users/Pandora/DEVELOP/Bushido Renew - iOS 2017.2b5 > copy/Temp/StagingArea/Data/Managed/ProBuilderCore-Unity5.dll” > stdout: Fatal error in Unity CIL> Linker Mono.Cecil.ResolutionException:> Failed to resolve> UnityEngine.XR.XRSettings at> UnityLinker.AddUnresolvedStubsStep.Process> () [0x000ab] in><8faa3831367147a5b4f1efc161d11bdf>:0> at Mono.Linker.Steps.BaseStep.Process> (Mono.Linker.LinkContext context)> [0x00018] in><114d8887b0b545308ed79d49a500b4cd>:0> at Mono.Linker.Pipeline.Process> (Mono.Linker.LinkContext context)> [0x00025] in><114d8887b0b545308ed79d49a500b4cd>:0> at UnityLinker.UnityDriver.Run ()> [0x00087] in><8faa3831367147a5b4f1efc161d11bdf>:0> at> UnityLinker.UnityDriver.RunDriverWithoutErrorHandling> () [0x00001] in><8faa3831367147a5b4f1efc161d11bdf>:0> at UnityLinker.UnityDriver.RunDriver> () [0x00002] in><8faa3831367147a5b4f1efc161d11bdf>:0> stderr:> UnityEngine.Debug:LogError(Object)> UnityEditorInternal.Runner:RunProgram(Program,> String, String, String,> CompilerOutputParserBase) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)> UnityEditorInternal.Runner:RunManagedProgram(String,> String, String,> CompilerOutputParserBase, Action`1)> (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)> UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1,> String&, String&, String, String) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)> UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[],> String[], String, String, String&,> String&, String,> IIl2CppPlatformProvider,> IEnumerable`1) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82)> UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String,> IEnumerable, String, String[],> String[], String,> IIl2CppPlatformProvider,> RuntimeClassRegistry) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:200)> UnityEditorInternal.AssemblyStripper:StripAssemblies(String,> IIl2CppPlatformProvider,> RuntimeClassRegistry) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114)> UnityEditorInternal.IL2CPPBuilder:Run()> (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)> UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String,> String, IIl2CppPlatformProvider,> Action`1, RuntimeClassRegistry,> Boolean) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34) ___ > Exception:> /Applications/Unity/Unity.app/Contents/il2cpp/build/UnityLinker.exe> did not run properly!> UnityEditorInternal.Runner.RunProgram> (UnityEditor.Utils.Program p,> System.String exe, System.String args,> System.String workingDirectory,> UnityEditor.Scripting.Compilers.CompilerOutputParserBase> parser) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)> UnityEditorInternal.Runner.RunManagedProgram> (System.String exe, System.String> args, System.String workingDirectory,> UnityEditor.Scripting.Compilers.CompilerOutputParserBase> parser, System.Action`1> setupStartInfo) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)> UnityEditorInternal.AssemblyStripper.RunAssemblyLinker> (IEnumerable`1 args, System.String&> out, System.String& err, System.String> linkerPath, System.String> workingDirectory) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)> UnityEditorInternal.AssemblyStripper.StripAssembliesTo> (System.String[] assemblies,> System.String[] searchDirs,> System.String outputFolder,> System.String workingDirectory,> System.String& output, System.String&> error, System.String linkerPath,> IIl2CppPlatformProvider> platformProvider, IEnumerable`1> additionalBlacklist) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82)> UnityEditorInternal.AssemblyStripper.RunAssemblyStripper> (System.String stagingAreaData,> IEnumerable assemblies, System.String> managedAssemblyFolderPath,> System.String[] assembliesToStrip,> System.String[] searchDirs,> System.String monoLinkerPath,> IIl2CppPlatformProvider> platformProvider,> UnityEditor.RuntimeClassRegistry rcr)> (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:200)> UnityEditorInternal.AssemblyStripper.StripAssemblies> (System.String stagingAreaData,> IIl2CppPlatformProvider> platformProvider,> UnityEditor.RuntimeClassRegistry rcr)> (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114)> UnityEditorInternal.IL2CPPBuilder.Run> () (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)> UnityEditorInternal.IL2CPPUtils.RunIl2Cpp> (System.String tempFolder,> System.String stagingAreaData,> IIl2CppPlatformProvider> platformProvider, System.Action`1> modifyOutputBeforeCompile,> UnityEditor.RuntimeClassRegistry> runtimeClassRegistry, Boolean> debugBuild) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)> UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls> (BuildSettings bs,> UnityEditor.iOS.ProjectPaths paths,> UnityEditor.AssemblyReferenceChecker> checker,> UnityEditor.RuntimeClassRegistry> usedClassRegistry,> UnityEditor.BuildReporting.BuildReport> buildReport) (at> /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:764)> UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess> (BuildSettings bs,> UnityEditor.iOS.ProjectPaths paths,> UnityEditor.RuntimeClassRegistry> usedClassRegistry,> UnityEditor.BuildReporting.BuildReport> buildReport) (at> /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:602)> UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess> (PostProcessorSettings> postProcessorSettings,> BuildPostProcessArgs args) (at> /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:558)> UnityEditor.iOS.iOSBuildPostprocessor.PostProcess> (BuildPostProcessArgs args) (at> /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:37)> UnityEditor.PostprocessBuildPlayer.Postprocess> (BuildTargetGroup targetGroup,> BuildTarget target, System.String> installPath, System.String> companyName, System.String> productName, Int32 width, Int32> height, BuildOptions options,> UnityEditor.RuntimeClassRegistry> usedClassRegistry,> UnityEditor.BuildReporting.BuildReport> report) (at> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:263)> UnityEditor.HostView:OnGUI() ___ > UnityEditor.BuildPlayerWindow+BuildMethodException:> Build failed with errors. at> UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer> (BuildPlayerOptions options) [0x001b9]> in> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162> at> UnityEditor.BuildPlayerWindow.CallBuildMethods> (Boolean askForBuildLocation,> BuildOptions defaultBuildOptions)> [0x00050] in> /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83> UnityEditor.HostView:OnGUI() I already have tried to change 'Scripting Backend' from IL2CPP to Mono, all 'Api Compatibility Level' options, enable and disable 'Strip Engine Code' and all three 'Stripping Level' options, but each change brings some different error and none of the solutions solved my problems.

NullReferenceException: Object reference not set to an instance of an object PlayerController.FixedUpdate () (at Assets/Scripts/PlayerController.cs:20)

$
0
0
Here is my script: using UnityEngine; using System.Collections; public class PlayerController : MonoBehaviour { public float speed; private Rigidbody rb; void start () { rb = GetComponent(); } void FixedUpdate () { float moveHorizontal = Input.GetAxis ("Horizontal"); float moveVertical = Input.GetAxis ("Vertical"); Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical); rb.AddForce(movement * speed); } }

In Offline Mode, Firebase show error log about WebSocket: ws_0 - could not get ip address on Unity Editor

$
0
0
I'm using Mac OS. I run my project Unity on Editor with turn off internet. When I call funtion: mDatabaseRef.UpdateChildrenAsync(childUpdates); Firebase show more error about WebSocket exception, image below: ![Websocket Exception when start Unity Editor in Offline Mode][1] [1]: /storage/temp/100855-screen-shot-2017-08-29-at-24047-pm.png I had run quick sample project about Firebase on Unity: I received same issue. Have someone has same issue? Can you help me solve it? Thanks !

UnauthorizedAccessException: Access to path is denied error

$
0
0
Hello, everyone! I created a plugin for android that allows a user to pick a file from either external or internal storage of the phone. That part works fine. I'm running on Android 6.0.1. I've also allowed all permissions needed. However, i'm having problems when I'm trying to access the said file for upload later. Using this line of code: FileStream file = new FileStream("filePath", FileMode.Open); When I'm trying to get file from the internal storage, I could upload it without problem. The value of the filePath is > /storage/emulated/0/Download/demo.apk When I try to get file from my SD card, I get UnAuthorizedAccessException saying that the access to path is denied. The filePath value is > /storage/6133:6330/Download/demo.apk Any heads up on how to solve this issue? Is it because of the FileStream or is it because of my plugin? Thanks in advance.

No line numbers in stack trace

$
0
0
I've been using Unity for a while, and usually when an Exception is thrown and I click it in the console, it gives me line numbers for every part of the stack trace. Here is what is looks like now (part of it): ArgumentOutOfRangeException: Argument is out of range. Parameter name: index System.Collections.Generic.List`1[System.Collections.Generic.List`1[System.Boolean]].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633) GameModeScreen.UpdateVariation () GameModeScreen.set_currVariation (Int32 value) GameModeScreen.set_currMode (Int32 value) GameModeScreen.HigherMode () At the end of the third line it gives me a line in some c# library (".../List.cs:633"), it used to also print those line numbers for the scripts written by me. For example the last lines, it would usually print the corresponding line in the "GameModeScreen" script. Did I acidentally disable that?

Package directory not found for DataContractSerialization

$
0
0
Anyone know what might be causing this error? I still seem to be able to create and run projects, but I worry I might be missing some functionality somewhere... System.Exception: Package directory not found: "C:\Users\me\.nuget\packages\System.Private.DataContractSerialization\4.1.1". at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve () [0x000dd] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 at AssemblyUpdater.Core.AssemblyUpdaterContext.AddFrameworkFolderToSearchPath (Mono.Cecil.AssemblyDefinition assemblyDefinition, Mono.Cecil.DefaultAssemblyResolver resolver, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x000eb] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 at AssemblyUpdater.Core.AssemblyUpdaterContext.ReadAssembly (System.String assemblyPath, APIUpdater.Framework.Log.IAPIUpdaterListener listener, System.IO.FileAccess mode, System.String[] searchPaths) [0x00086] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, APIUpdater.Framework.Configuration.IConfigurationProvider configuration, System.String[] assemblySearchPaths, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x0002b] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, System.String[] assemblySearchPaths, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x00001] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config) [0x00013] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00057] in <2e2e6e53129e4ba1874d2ad0eec22c59>:0 UnityEditor.Scripting.APIUpdaterHelper:DoesAssemblyRequireUpgrade(String)

Npgsql dll working in Standalone Build but not in Editor

$
0
0
Hello. I'm currently using an Npgsql.dll which I have placed in my Plugins folder. I'm using it in two different projects. Both my projects work fine when built. The dll does its job and allows me to change my PostgreSQL database . The problem lies when I try to run the same scenes in the Editor. For the **first project**, I get a **MissingMethodException : Method not found : 'NpgsqlParameterCollection.AddWithValue** . The weird thing is that a few lines before, sever methods from the Npgsql library have been called and they never produced an error. For the **second project**, I got the same error if I use the same method. The game completely crashes though when I'm trying to read from the database. As you can see, the problem is probably caused by the Editor being unable to access parts of the library. For anyone wondering, the import settings for the dll are at default to all platforms and it's targeting .NET 3.5. If you have any ideas on why this is caused, I'd greatly appreciate it since it's quite nerve-wracking not being able to easily check a debug.
Viewing all 470 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>