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.
↧
Warnings when I build my Android apk
↧
Warning: Ignoring asset refresh (2017.1.0f3)
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!
↧
↧
Used GUID for asset. Assigning a new guid? What does it mean?
Hey guys,
so I have an existing project. I created a Level1 with 2D Terrain Editor tool. Today, I imported a Level2 made by the same tool but on a different computer. So I impoted this Level2 to my existing project and two warnings came up:
The GUID for Assets/TerrainEdit/MeshesForCarLvl2/Terrain2D_mesh_3.asset is already in use by Assets/2DTerrainEditor/SavedMeshes/Terrain2D_mesh_2.asset. Assigning a new guid.
And what actually happend? The level uses the mash as a pattern how the level should look like. What happend? The two levels are using the same mesh after the import of Level2 and are the same. It changed the mash of Level2 using mash from Level1. So I manually assign the right meshes and it is ok. May a problem accure since the warning?
Thanks for any answer...
↧
UnityEditor.HostView:OnGUI() Warnings!!
Updated macbookpro to El Capitan
Downloaded Unity 5.2.2f1 and installed it
Copied my project files from my desktop computer so I can do a Iphone port.
When I build the project I get...
Unknown file extension: .dat
UnityEditor.HostView:OnGui()
Unknown file extension: .ini
UnityEditor.HostView:OnGui()
Unknown file extension: NOTHING HERE
UnityEditor.HostView:OnGui()
Unknown file extension: .aspx
UnityEditor.HostView:OnGui()
Unknown file extension: .config
UnityEditor.HostView:OnGui()
Unknown file extension: .map
UnityEditor.HostView:OnGui()
Unknown file extension: .browser
UnityEditor.HostView:OnGui()
Unknown file extension: .xml
UnityEditor.HostView:OnGui()
I have searched through the net and here but can't seem to locate anything on this.
Any help would be greatly appreciated!!
YellzBellz Online Games, Programming and More!
Thanks!
↧
Box Collider 2D -failed verification- warning even when the size is reasonable
I have a script that is executed in Edit Mode, it creates various gameobjects with a Box Collider 2D component attached to each one of them, and rotates their transforms based on a logic in my game.
The problem is that some of those Box Collider 2D components fire this warning after they're set:
" *The collider did not create any collision shapes as they all failed verification. This could be because they were deemed too small or the vertices were too close. Vertices can also become close under certain **rotations** or very small scaling.* "
As I change the rotation from the inspector of some of those created GOs, the Box Collider 2D component works again, so the warning is due to their rotations. Also note that the scale isn't the problem as it's set to 1.
My question is, what do the "working angles" have in common? I can take into account this information in my script to only include those specific angles and therefore generating working Box Colliders.
It would be better if there was a solution for this problem regardless of the transform's rotation.
↧
↧
Mathf.Approximately, how to apply this to my script?
Hi in my state machine I have two numbers generated through Random.Range in the void start function, I want to use Mathf.Approximately to check which number has come out higher and to print that in the console, but I am not sure how to do this. Any help would be appreciated.
The code I am using is:
{
int playerDiceRoll;
int enemyDiceRoll;
private BattleStateStart battleStateStartScript = new BattleStateStart ();
public enum BattleStates
{
START,
PLAYERROLL,
ENEMYROLL,
PLAYERCHOICE,
ENEMYCHOICE,
DAMAGECALCULATION,
LOSE,
WIN
}
private BattleStates currentState;
void Start ()
{
currentState = BattleStates.START;
playerDiceRoll = Random.Range (1, 10);
print (playerDiceRoll);
enemyDiceRoll = Random.Range (1, 10);
print (enemyDiceRoll);
if (Mathf.Approximately(1.0f, 10.0f / 10.0f));
print("same");
}
void Update ()
{
Debug.Log(currentState);
switch(currentState)
{
case (BattleStates.START):
//SETUP BATTLE FUNCTION
//create enemy
//choose who goes first based on dice roll
break;
case (BattleStates.PLAYERROLL):
break;
case (BattleStates.ENEMYROLL):
break;
case (BattleStates.PLAYERCHOICE):
break;
case (BattleStates.ENEMYCHOICE):
break;
case (BattleStates.DAMAGECALCULATION):
break;
case (BattleStates.LOSE):
break;
case (BattleStates.WIN):
break;
}
}
void OnGUI ()
{
if(GUILayout.Button("NEXT STATE"))
{
if(currentState == BattleStates.START)
{
currentState = BattleStates.PLAYERROLL;
}
else if (currentState == BattleStates.PLAYERROLL)
{
currentState = BattleStates.ENEMYROLL;
}
else if (currentState == BattleStates.ENEMYROLL)
{
currentState = BattleStates.PLAYERCHOICE;
}
else if (currentState == BattleStates.PLAYERCHOICE)
{
currentState = BattleStates.ENEMYCHOICE;
}
else if (currentState == BattleStates.ENEMYCHOICE)
{
currentState = BattleStates.DAMAGECALCULATION;
}
else if (currentState == BattleStates.DAMAGECALCULATION)
{
currentState = BattleStates.LOSE;
}
else if (currentState == BattleStates.LOSE)
{
currentState = BattleStates.WIN;
}
else if (currentState == BattleStates.WIN)
{
currentState = BattleStates.START;
}
}
}
}
↧
how to make the warning DontDestroyOnLoad only work for root GameObjects go away?
I keep getting this warning every time I try and use DontDestoyOnLoad:-
"DontDestroyOnLoad only work for root GameObjects or components on root GameObjects."
This didn't show up pre Unity 5.3 so whats up?
↧
Suddenly warnings are thrown as errors at random in Unity
Since switching to a new computer with VS2015 (from VS2013), Unity3d sometimes suddenly throws harmless warnings (cs0219 & cs0414, i.e. an assigned variable or field that is never used) as errors that block me from compiling. Besides actually "fixing" these warnings there's this dissatisfactory workaround: close unity3d and vs2015 and reopen them again. Then it won't complain about those warnings for a while until it suddenly considers them errors again.
I've read about someone running into this issues because of a virus scanner, is that possible (am using a different one than on old computer (McAffee instead of Avira)?
The VS project's settings have "treat warnings as errors" set to None, so I don't understand why this happens. The seemingly random frequency of when this happens looks suspiciously like an "outside" cause. Any ideas?
running windows 10 and unity 5.0.3
↧
How Can I Build My Game
So, I've been developing a game for test st window, so I build my finished project so that i can check my work what I've done so far, which finishes without a problem. But then, I try to make a build of the same game for Windows, which is what my system is. I have done this plenty of times before, but this time, in the middle of building, it gave me an error and I had to Force Quit. Now when I load up my scene, I can still test the game in the editor, as it gives me no compiler errors, but whenever I try to make a build for Windows, it gets stuck on "Compiling Scripts" for a few seconds, and aborts with a "ding" noise. If I check my console window, it gives me the following errors:
Please help me these are the warnings....
D:\Project\unity\New Project\Assets\Standard Assets\Character Controllers\Sources\Scripts\CharacterMotor.js(37,37): Warning BCW0003: WARNING: Unused local variable 'lastVelocity'. (BCW0003) (Assembly-UnityScript-firstpass)
D:\Project\unity\New Project\Assets\Standard Assets\Character Controllers\Sources\Scripts\CharacterMotor.js(1,1): Warning BCW0016: WARNING: Namespace ''System.Collections'' is never used. (BCW0016) (Assembly-UnityScript-firstpass)
these are the scripts in standard assets but every time when i compile Game it is just working Good at unity but not making a build of game...
How do I fix this? I have tried to clean up unity from mono develop BY pressing "clean all" and when i do rebuild all to again it gives bundles of warning like 50,,,, 60 etc.....
@Zuon94
@Bunny83
↧
↧
173 warnings with build to XCode 7
I tried following the tutorial below to create a general test game with Unity 5 to run on my iPad with Xcode 7. The app runs successfully with some warnings in Xcode.
https://www.youtube.com/watch?v=0uXWgV6uOmg
The only thing that I did differently is using a basic script on the cube to rotate instead of using playmaker:
> // Update is called once per frame
void Update () {
transform.Rotate (new Vector3 (0,-100,0) * Time.deltaTime);
}<
I am getting 173 warnings that do not affect the final output but I do not like having all that mess. I would rather have a error/warning free app that is nice and clean to start with before I get into more complex apps.
Most of the errors are under GenericMethods0.cpp and are all the same about unused variables L_5 and L_6 as shown in the first screen... ??
The rest are as follows in the second screen. I am not concerned about the icon warning I can fix that easily but not sure why Unity does not create this by default... ??
FYI I did first get an update recommended settings warning I went ahead and complied with. Not
doing the update resulted in the same errors though.
Thank you,
R
![alt text][1]
![alt text][2]
[1]: /storage/temp/64788-screen-shot-2016-02-27-at-32612-pm.png
[2]: /storage/temp/64787-screen-shot-2016-02-27-at-32549-pm.png
↧
Why is cloud build not ignoring hidden assets?
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)
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?
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)
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
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)
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 ?
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?
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?
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?
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!
↧