Quantcast
Channel: Questions in topic: "warnings"
Viewing all 187 articles
Browse latest View live

Why is cloud build not ignoring hidden assets?

$
0
0
According to the docs, there are several folders one can use to let Unity know that they should not be integrated into the project. I am using the "cvs" named folder. [SpecialFolders][1] But cloud build is spamming warnings for each and every file including that root folder, that a meta file is missing. Shouldn't cloud build ignore those folders as well? [1]: http://docs.unity3d.com/Manual/SpecialFolders.html

Getting Unresolved Reference Warnings After Unity Update (To 5.3.4f1 64-bit)

$
0
0
After updating to Unity 5.3.4f1 (64-bit), I am receiving three similar warnings: "The primary reference "**UnityEditor**" could not be resolved because it has an indirect dependency on the framework assembly "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5,Profile=Unity Web v3.5". To resolve this problem, either remove the reference "UnityEditor" or retarget your application to a framework version which contains "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". GameProject.CSharp" ..and two similar Warnings that is almost identical but with "UnityEngine.Networking" and "UnityEngine.UI" instead of the above "**UnityEditor**" (in bold). From the two solutions listed in the warning, I don't want to remove the references as I might need it in the future. In regards to re-targeting my application, from what I understand, we can only choose between ".NET 2.0" and ".NET 2.0 Subset" from Unity > Edit > Project Settings > Player > Api Compatibility Level, but choosing either did not eliminate the warnings.

what does this warning mean?

$
0
0
WARNING: Implicit downcast from 'UnityEngine.Component' to 'UnityEngine.Animation'. i got this warning twice here's the lines of script its talking about RunningAnimation=GetComponent("Animation"); Idle=GetComponent("Animation");

what do these warnings mean (im using javascript)

$
0
0
im still new to the animations and scripting for them but im getting a new warning ive never seen before the warnings are Animator has not been initialized. UnityEngine.Animator:GetBool(String) skeleton:Update() (at Assets/skeleton animations/skeleton.js:22) Animator has not been initialized. UnityEngine.Animator:SetBool(String, Boolean) skeleton:Update() (at Assets/skeleton animations/skeleton.js:20) and here are the lines of script these warnings are talking about 22|if(Skeleton.GetBool("idle")==true) 20|Skeleton.SetBool("idle", false);

Playable was not disposed warning

$
0
0
I am using instantiate to create a game character and have been doing so for some time. After upgrading to 5.4 I now get this annoying little warning, Playable was not disposed, referring to the line in the code where the character was instanced. The warning shows up after stopping play mode in the editor, but it only happens once, the first time after a fresh start of Unity. If I continually run the project through the same process, no warning. If I restart Unity, I get the warning again the first time it runs through that code. Am I doing something wrong or is there something I need to set in 5.4 to stop showing this warning?

script isn't loading (beginner question)

$
0
0
Im a beginner with Unity, so this is probably an easy fix. I'm following Unity's Space Shooter tutorials and I'm stuck on part 06, trying to write the code for the shots. Had some issues with the scripting becuase of differences in versions (im on the latest version of unity, the tutorial is still on unity 4) but thanks to a youtube commenter I think I got it fixed. I hit the play button at the top left of monodevelop and everything seems fine, I check for errors/warnings and there seem to be none. My problem is when I go to the empty object the script is attached to, it says this: The associated script can not be loaded. Please fix any compile errors and assign a valid script. The script seems good and I can't figure out what could be wrong. Any ideas?

coroutines - get compile (or runtime) warning when called as a normal method ?

$
0
0
In the following code example, the coroutine is being called as a normal method - ie, not from a yield in another coroutine and not via StartCoroutine(). the result is that **none** of the code in the coroutine is executed. i would love to get a runtime error in this situation, or even better, a compile-time error. anybody know how to do that ? void test() { Debug.log("before calling coroutine"); // prints myCoroutine(); Debug.log("after calling coroutine"); // prints } IEnumerator myCoroutine() { Debug.log("inside the coroutine"); // does not print yield break; }

How to access compiler warnings to i.e. output them to custom console?

$
0
0
If you have used for example an obsolete method like Application.LoadLevel(), you will see a compiler warning about it in Unity's console window every time the compiler finishes compiling/importing scripts. I'm making a custom console implementation and would like to get the compiler warnings to show in the custom window as well. Using a custom ILogHandler for example doesn't seem to work in this case, which kinda makes sense, since how could a piece of code output warnings that happen when it's only just under compilation :) Is there an easier way to get access to the compiler output than parsing Editor.log? I did notice the compiler outputs the warnings there. Here's a part of what I tried with ILogHandler, not that it matters since I don't think this is the way to go anyway, It adds a "my log" prefix to all console output just to demonstrate which pieces of logging i can access from code to do something with them. editor/SomeEditorWindow.cs using UnityEditor; using UnityEditor.Callbacks; using UnityEngine; public class SomeEditorWindow : EditorWindow { [MenuItem("Window/SomeEditorWindow")] static void Init() { ((SomeEditorWindow)GetWindow(typeof(SomeEditorWindow))).Show(); } private void OnEnable() { new SomeLogHandler(); Debug.Log(" OnEnable "); } [DidReloadScripts] private static void OnScriptsReloaded() { new SomeLogHandler(); Debug.Log(" OnScriptsReloaded "); } } class MyAllPostprocessor : AssetPostprocessor { static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { Debug.Log(" OnPostprocessAllAssets 1 "); new SomeLogHandler(); Debug.Log(" OnPostprocessAllAssets 2 "); } } SomeLogHandler.cs using UnityEngine; using System; public class SomeLogHandler : ILogHandler { private readonly ILogHandler defaultLogHandler = Debug.logger.logHandler; public SomeLogHandler() { if (!(Debug.logger.logHandler is SomeLogHandler)) { Debug.logger.logHandler = this; } } public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args) { // was hoping to capture compiler warnings here defaultLogHandler.LogFormat(logType, context, "my log " + format, args); } public void LogException(Exception exception, UnityEngine.Object context) { defaultLogHandler.LogException(exception, context); } } public class Test { public Test() { Application.LoadLevel("intentional compiler warning bcos obsolete"); } } If you click window-> SomeEditorWindow and then right-click and reimport SomeLogHandler.cs, the console will output ![console output][1] So everything except the compiler warning gets the desired "my log" prefix. [1]: /storage/temp/80926-console.png

Can I still use the obsolete APIs?

$
0
0
After updating my project from Unity4.7.2 to Unity4.5.2, many obsolete APIs were auto-fixed, but still some remain leading a lot of warnings. Like this: Assets/Standard Assets/Water (Pro Only)/Sources/Scripts/Water.cs(91,28): warning CS0618: `UnityEngine.GL.SetRevertBackfacing(bool)' is obsolete: `Use invertCulling property'. Must I fix them one by one? Can these obsolete APIs still work?

Build finished after Google Play Games plugin setup but gives 2 FileNotFoundException (s) Should I be worried?

$
0
0
Hello everyone, I've been trying to get the Google Play Games plugin from GitHub to work in a test project in order to try out a Leaderboards asset I got from the store. The steps I've taken so far are mentioned in detail in [a recent post here.][1] About the only thing I haven't tried yet is to update from Unity 5.3.1 to 5.4.1 but to avoid another potential "can of worms" I'm saving that as last resort and wanted to get a second opinion first. So far, I can build a signed APK that the Google Dev. Console accepts, and can even deploy to a test device, but I'm still getting the following Errors, and Warning logs: [1]: http://answers.unity3d.com/questions/1263446/google-play-games-plugin-introduces-unable-to-find.html#answer-1266415 FileNotFoundException: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. UnityEditor.HostView:OnGUI() FileNotFoundException: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Google.IOSResolver..cctor () Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Google.IOSResolver UnityEditor.HostView:OnGUI() Resolver version is now: 10101 UnityEngine.Debug:Log(Object) GooglePlayServices.PlayServicesResolver:RegisterResolver(IResolver) GooglePlayServices.ResolverVer1_1:.cctor() UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[]) WARNING: No compatible versions of com.android.support:support-v4 required by (com.google.android.gms:play-services-basement:9.8.0), will try using the latest version 24.0.0 UnityEngine.Debug:Log(Object) Google.JarResolver.PlayServicesSupport:Log(String, Boolean) Google.JarResolver.PlayServicesSupport:ResolveDependencies(Boolean) GooglePlayServices.ResolverVer1_1:DoResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation) GooglePlayServices.c__AnonStorey1:<>m__0() GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action) GooglePlayServices.PlayServicesResolver:Resolve(Action) GooglePlayServices.PlayServicesResolver:AutoResolve() UnityEditor.EditorApplication:Internal_CallUpdateFunctions() WARNING: No compatible versions of com.android.support:support-annotations required by (com.android.support:support-v4:23.1+, com.android.support:support-v4:24.0.0), will try using the latest version 24.0.0 UnityEngine.Debug:Log(Object) Q: - Should I go ahead an try to import the Leaderboards plugin despite these Errors/Warnings? - Would an update from Unity 5.3.1 to 5.4.1 be likely to resolve said Warnings? Thank you for reading; Any advice/opinion on the mater is appreciated!

What are the yellow triangles supposed too be and how do I get rid of them with out just pushing clear button?

$
0
0
Hi it's me Richard Haley again just asking what the yellow triangles are and do I only fix the problem by just hitting the clear button or do I also have too do something else to fix it?

Best Practice for Shaders with Variants and Asset Bundles

$
0
0
We are working through the process of dealing with shaders and bundles. There are a couple conditions that work, but there are some concerns that arise around Standard Shader, and one that extends Standard Shader. Including Standard Shader in "Always Included Shaders" seems to be counter indicated, resulting in the following warning: > Shader "Standard" with 157766 variants> is marked as always included (see> Graphics Settings). This will result> in long build times and runtime memory> consumption. **Please use a shader> variant collection instead.** The documentation on how to follow the indicated **"instead"** is thin at best, and nonexistent perhaps more accurately. A shader variant collection cannot be included into the **"Always included Shaders"** list, but can be included into the **"Preloaded Shaders"** list. It is not clear however if the preloaded shader list ALSO achieves force including the selected variants. Right now we are left with a possible false positive because there may be a material getting included into the main build that is doing this for us. I'm looking for better clarity on the golden path implied by the above warning for using **ShaderVariantCollection** to force included needed variants.

AssetBundle Manager - Update for Unity3D 5.4?

$
0
0
I've been working on my first asset bundle stuff for the last day or so, and the AssetBundle Manager helped out a lot. I haven't been able to find a version that has been updated for Unity3D 5.4+ though. I haven't run into any functionality problems yet, but it throws 6-8 warnings up about functions being deprecated. I'm about to go through the manager code and clean it up myself (assuming nothing is too tricky to update, following the warnings), but has it been updated somewhere? This seems like an important and core module to get left behind for months. Or, is there an alternative solution that you recommend I use instead? If so, why?

What mean JobAlloc.Overflow during my Camera.Render ?

$
0
0
Hy, I have a warnings when I profile my game on my android devices. ![alt text][1] [1]: /storage/temp/86944-profiler.png Is somebody can tell me what it means ?

unity crashes on start

$
0
0
Always when I want to start Unity it says: Unity doesn't work anymore As I installed it the first time there was this warning: could not enable .net framework 3.5 the program could maybe not work. So it didn't work. Then I reinstalled it and installed it again. But the warning didn't come. But when i start Unity the message "Unity doesn't work anymore" comes up. Thanks for the answers and sorry for this English :-| *I use Windows 10 and newest version of unity.

"Field " " is never assigned to, and will always have it's default value null"

$
0
0
Hi im 100% new to coding I was following this tutorial for a quiz https://www.youtube.com/watch?v=zLnnpUsxu0U and I'm done but it keeps giving me this warning in monodevelop "Field "__ " is never assigned to, and will always have it's default value null. the problem is [SerializeField] private Text factText; to [SerializeField] private Animator animator; heres the code (c#) using UnityEngine; using UnityEngine.UI; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine.SceneManagement; public class GameManager1 : MonoBehaviour { public Questions[] questions; private static List unansweredQuestions; private Questions currentQuestion; [SerializeField] private Text factText; [SerializeField] private Text trueAnswerText; [SerializeField] private Text falseAnswerText; [SerializeField] private Animator animator; [SerializeField] private float timeBetweenQuestions = 1f; void start () { if (unansweredQuestions == null || unansweredQuestions.Count == 0) { unansweredQuestions = questions.ToList(); } SetCurrentQuestion(); } void SetCurrentQuestion () { int randomQuestionIndex = Random.Range(0, unansweredQuestions.Count); currentQuestion = unansweredQuestions[randomQuestionIndex]; factText.text = currentQuestion.fact; if (currentQuestion.isTrue) { trueAnswerText.text = "CORRECT"; falseAnswerText.text = "WRONG"; } else { trueAnswerText.text = "WRONG"; falseAnswerText.text = "CORRECT"; } } IEnumerator TransitionToNextQuestion () { unansweredQuestions.Remove(currentQuestion); yield return new WaitForSeconds(timeBetweenQuestions); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); } public void UserSelectTrue () { animator.SetTrigger("True"); if (currentQuestion.isTrue) { Debug.Log("CORRECT!"); } else { Debug.Log("WRONG!"); } StartCoroutine(TransitionToNextQuestion()); }

Unity 5.5.1 - Weird and conflicting variable never used warning.

$
0
0
I have the following in a script: private Brick brick; void Start() { brick = GameObject.FindObjectOfType(); } This is only a very small portion of the code in this script. I keep getting the warning that the variable "brick" is assigned but never used. If i delete the variable, of course, I get an error that says "the name brick does not exist in the current context. It can't be that I have assigned the variable and simultaneously not assigned it! Anyone know the answer to this? it's a bit annoying. I'm close to finishing up my game and want to clear out all the warning but this one is stubborn.

vscode - exclude directories from warnings + code style linter

$
0
0
**vscode config** Recently switched from mono to vscode with unity 5.5+, all good except for excluding warnings from 3rd party plugins/assets - seeing warnings in my own code can be arduous . .vsode/setting.json - "files.exclude" doesn't exclude/suppress warnings I am also looking for a good style guide linter, simalar to eslint/airbnb for js or pep8 for python Any help would be much appreciated! Thank you in advance **Screenshot of 3rd party 'problems' I wish to filter/hide attached.** ![alt text][1] [1]: /storage/temp/95960-annoying.png

Warnings when I build my Android apk

$
0
0
I get 36 Warnings that are all nearly the same. The ending is everytime: warning CS0618: `GooglePlayGames.BasicApi.Quests.IQuestMilestone' is obsolete: `Quests are being removed in 2018.' One specific Example: Assets/GooglePlayGames/Platforms/Native/NativeQuestClient.cs(87,76): warning CS0618: `GooglePlayGames.BasicApi.Quests.IQuestMilestone' is obsolete: `Quests are being removed in 2018.' Please help.

Warning: Ignoring asset refresh (2017.1.0f3)

$
0
0
Since unity 2017, every now and then, I get a warning with the following message: **Ignoring asset refresh of [some 34-character hex number] because the file or its directory couldn't be found!** It is somewhat annoying. If you know a fix of some sort, please let me now. Thanks!
Viewing all 187 articles
Browse latest View live