Skip to main content

Posts

Showing posts with the label Tutorial

rc.right == m_gfxwindow->getwidth() [FIX]

The error is: SUCCEEDED ( hr ) rc . right == m_GfxWindow -> GetWidth () && rc . bottom == m_GfxWindow -> GetHeight ()   it works in most cases, but not all time. Solutions From different users: I found that closing and re-opening unity fixed the error (or at least stopped it from showing up in the footer). I re-started Unity and the message is gone. I tried run unity as admin and the problem is solved  I had the same problem. I was using two screen and it was solved when I turned off one of them.  see also: NullReferenceException: Object reference not set to an instance of an object Unity’s latest Facebook build target finally available as a Developer Beta Mode

Adcolony Clear Cache Solution

We know that developing android apps and working with AdColony SDK to show video ads gives you problem. The problem we found usually it keeps downloading video ads and save them on the device. I found the comment from the person from Adcolony, He says AdColony does cache our assets to the device - both for quality (instant loading advertisements) as well as reusability. Many assets are shared across multiple campaigns and in the case that a duplicate advertisement is served it saves you from re-downloading the same assets. Each device has a specific memory class (or app specific memory limit) that we will not exceed, and we also purge old and unused assets occasionally to keep the size down. While it is possible to programmatically clear your app's data cache, we do not recommend this as it may lead to redundant downloads and unnecessary data usage. Please feel free to contact us further at support@adcolony.com. Solution: Your video is stored in the application dat...

Your android debug keystore file is missing [FIX]

  There must be some other ways to solve this error. But how i solved is simply adding this line of code in FacebookAndroidUtil.cs file System.Environment.GetEnvironmentVariable("G:\android\android-sdks") + @"\.android\debug.keystore" :    The problem was i had %HOMEPATH% environment variable in other drive(In G:/) and unity project in another drive. Then whenever Facebook SDK calls System.IO.File.Exists(DebugKeyStorePath), DebugKeyStorePath is actually wrong. That is because DebugKeyStorePath is searching in System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" Which is wrong path to find the key. Solution Go to FacebookAndroidUtil.cs file, and on line 62 change the code from System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" :  To System.Environment.GetEnvironmentVariable(" G:\android\android-sdks ") + System.Environment.GetEnvironm...

Submit an Android App To The Amazon App Store Tutorial Unity

If you are looking to double the Installs of your Android app? Finding an alternate app store to submit your app? The Amazon App Store has become the biggest after the Google Play Store there are a few of exclusives also. Together with their personal Android devices, Amazon began the app store to fight against Google. A important advantage for setting up it is that you simply reach download the “Free App of the Day” daily! Almost all of app developers submit their apps on the Google Play Store however neglect numerous alternative stores being popular. The Amazon App Store is yet another preferred app store for publishing your free or paid Android app! Complete Tutorial to Submit Android App to Amazon App Store: Click on this link & make your Amazon developer account. Complete registration process, in payment tab click yes if you want to monetize your app. Go to Amazon developer console here to start submit your app. https://developer.amazon.com/home.html Click on ...

Unable to find suitable jdk installation [Quick FIX]

Many begginner game develoeprs error about unable to find suitable jdk installation in unity. No problem it can be solved using this easy solution. First make sure you installed JDK if not download and install now. http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Now you just need to set the path in window Environment 1) Goto the control panel 2) Open the System item 3) Click "Advanced system settings" in the left bar 4) A popup opens 5) Click the Environment Variables button 6) A popup opens 7) In the User variables for USERNAME area click the New. button 8 ) Enter JDK_HOME as Variable name, enter the jdk installation path, in my case C:\Program Files\Java\jdk1.7.0_79\, this can be different in your pc 9) click Ok And you are done! Try building game and this time it will be fixed! see below image for more detail This is the simple guide on terror Unable to find suitable jdk installation hope you like it! S...

Publish Your Unity Game on Facebook Using Dropbox

Facebook is must have game platform to socialize your android and iOS games. I don't want to waste your time..  Lets Goto the Guide How to  Publish Your Unity Game on Facebook Using Dropbox 1.Register for the Facebook app   https://developers.facebook.com/apps complete form and details asked by Facebook. 2.Make sure you have dropbox installed in PC or mac   Sign up dropbox . Recommended Guide -  How To Publish Your WebPlayer Game For Free With Dropbox! 3.In Facebook developer app click Settings >  Add Platform and then select Facebook canvas. in canvas settings put your game URL in Secure Canvas URL and at the end of URL add '?'. NOTE: If you don't know how to build for web with Dropbox link, please visit above  Recommended Guide . 4.Click save, To play your game make sure game is live  available to the general public to make it live goto settings > basics and enter your valid email address click save then go...

Hiding the Navigation Bar in Android Unity

There a lots of way available to hide navigation bar from android apps, some are easy and some feels hard for newbies developers here today i am providing you some simple ways to hide navigation bar in android. For unity users i got very easy to use unity free asset to hide navigation bar get this cool asset now. https://www.assetstore.unity3d.com/en/#!/content/21774 After this i hope your problem will solved but if you still need some inside detail to work in script so here are official guide on this. https://developer.android.com/training/system-ui/immersive.html The main code from that official guide is here // This snippet hides the system bars. private void hideSystemUI () {     // Set the IMMERSIVE flag.     // Set the content to appear under the system bars so that the content     // doesn't resize when the system bars hide and show.     mDecorView . setSystemUiVisibility (           ...

Unity 2d Pathfinding Tutorial Using Poly|Nav

Though Unity comes with a perfect solution integrated for 3D pathfinding – the Nav Mesh – for the 2D games, that is less versatile because it particularly creates navigation meshes that horizontal throughout the Z axis. Lacking making a 2D system utilizing a custom orthographic camera, as well as your own sprite renderer, it can make more sense to stay with Unity’s 2D workflow. Now what’s the perfect solution? fortunate for your needs, Vaggelis Gavalakis has develop Polynav – a 2D pathfinding system designed to work with Unity’s sprite workflow. It’s experienced development a short period of time, and it is currently getting plenty of support and traction from the Asset Store and Unity forums. Have a look at videos below to find out the reason why this is really quite cool! Poly|Nav is actually a polygonal based 2D pathfinding system . which is quite simple to set-up and employ, designed for the Unity's latest 2D system games! Features - Define the walkable an...

Unity3D tips and tricks in GIF

we are going to provide a variety tips and tricks to use while you work with Unity. The following tips and tricks could possibly make your experience with Unity much better, faster, more powerful or they can simply keep us interested. lets see see also:   Optimizing Mobile Games in Unity Removing empty entry from an array  Putting many different prefabs in component’s listing within the editor. Note: will likely not maintain order of items Dealing with parenting and scrolling see also: Using Git With 3D Games Source Control  Displaying gizmos, colliders and raycasts (with Debug.DrawRay) IN GAME SCREEN while in play mode, works for the selected objects only Showing private variables in inspector.  Making empty gameobject visible only in editor see also: MOST PROFITABLE PROGRAMMING LANGUAGE for all these tips we only want you to do  +1

Asset Store Not Working - The Solutions

If you are facing unity "asset store loading" or  unity asset store not loading  error and waiting for a long time to get connected and download you asset? We don't like to talk more and just come to guide so now today we have some tips you can follow and get rid of these errors. First these types of error also faced by unity's team see what unity team member 'Graham Dunnett' told about this. Graham Dunnett Unity Technologies We have been having problems with Asset Store in recent days. Typically purchases complete, but Asset Store doesn't get told the transaction completes. For many customers who have contacted support, logging out and in again resolves the issue. May not work for everyone, but is worth trying. According to him logging out and in again resolves the issue. If this not work we have some more tips. First make sure you are logged in or not see also:   How I Reduce Draw Calls fr...

How I Reduce Draw Calls from 69 to 12 unity

Here is a video shows how to reduce draw calls in unity . The plugin we used to reduce unity draw calls is completely free and you can find it in asset store by the name of "draw call minimizer." The plugin is really easy to use and help you in reducing draw calls all the steps are described in their PDFs documentation. download asset here https://www.assetstore.unity3d.com/en/#!/content/2859 the script is very powerful The way that this script works, is that you have a parent object that everything being combined is child under. You attach the script to the parent object, fiddle with the settings if you need to, and play the game. All of the combining is done at run time so no extra assets are created. see also:   Optimizing Mobile Games in Unity MOST PROFITABLE PROGRAMMING LANGUAGES Using Git With 3D Games Source Control

Upload failed You need to use a different version code for your APK because you already have one with version code 2

Upload failed You need to use a different version code for your APK because you already have one with version code 2 This is the error i got when i am trying to upload my new APK file to google playstore. So what i did and it worked below are some steps you can follow to fix this error. 1. go to > assets > plugins > android There you will see AndroidManifest.xml file open it in MonoDevelop at the end of 2nd line there is  code android:versionCode="1"> Now you should change the code 1 to 2 or increment it by 1. 2.After that goto player settings in inspector you can see other settings click on that and change or increment it by 1increment it by 1 save it and build APK  Upload again in google play It will upload successfully . Note: use your previous certificate for new apk otherwise you will get another error. like this. Upload failed You uploaded an APK that is signed with a different certifica...

Optimizing Mobile Games in Unity

Good performance is critical specially for mobile devices.To give you some important techniques and info about making better performance we made this guide. First start it with draw call. What is draw calls and how to reduce them? Draw call is a material in an object drawn to screen/gameplay. for example an object with 1 material = 1 draw call and an object with 9 materials = 9 draw calls, camera, lights, shadows, sky and so on To reduce draw calls Unity can easily combine many objects at runtime plus draws them along with a single draw call. This process is called “ batching ”. The more objects Unity can batch with each other, the better rendering performance you can get. Only objects using the same material can be batched together. Below is an example of batching. A scene with lots of objects having only 3 draw calls. Things to keep in mind: You should have the total number of materials as low as possible. This will make it easier for Unity to batc...

Very Simplest Unity Custom Cursor Script

Unity default cursor settings are not really works in player setting they will show you cursor in unity engine but in web player after you build the game, I found in lots of forums about unity cursor scripts that people gives really hard methods for custom cursor, so today i found really awesome and clever script, here we got to the Very Simplest Unity Custom Cursor Script. Steps: create new java script and name it customcursor.js now past the following code in the script. var yourCursor : Texture2D;  // Your cursor texture var cursorSizeX : int = 16;  // Your cursor size x var cursorSizeY : int = 16;  // Your cursor size y function Start() {     Screen.showCursor = false; } function OnGUI() {     GUI.DrawTexture (Rect(Event.current.mousePosition.x-cursorSizeX/2, Event.current.mousePosition.y-cursorSizeY/2, cursorSizeX, cursorSizeY), yourCursor); } Now drag this script on camera and set y...

Prevent colliders from passing through each other.

Avoiding your objects from passing with each other is really tricky especially for fast moving objects like bullets and Prevent colliders. Today we made tutorial and script for you to show how to prevent colliders  from passing through each other. The best way to make sure that you detect all collision is to use Raycasting instead of depending on the physics simulation. This is helpful for bullets or small objects, but will likely not provide great results for large objects.  Below answer is from stackoverflow Collision with fast-moving objects is always a problem. A good way to ensure that you detect all collision is to use Raycasting instead of relying on the physics simulation. This works well for bullets or small objects, but will not produce good results for large objects. http://unity3d.com/support/documentation/ScriptReference/Physics.Raycast.html Pseudo-codeish (I don't have code-completion here and a poor memory): void FixedUpdate() { Ve...

How To Style Code? The Ultimate Guides

Writing code is little hard, but maintain its Code quality is really hard. Every programmer should follow code style guides without managing your code you can almost never accomplish high quality in your code base. We browsed and discovered ideal code style guides out there and wanted to share them with you: Javascript: https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml http://contribute.jquery.org/style-guide/js/ https://github.com/rwaldron/idiomatic.js/ Some good style guides from google,jquery and Rick Waldron It includes contributions by jQuery core contributor Rick Waldron, jsPerf contributor Mathias Bynens and several other skilled JS devs inside community. C#: http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx http://stylecop.codeplex.com/ http://msdn.microsoft.com/en-us/library/vstudio/ff926074.aspx To find C# style code is really hard, but we found some links for you from Microsoft and stylecop.Stylecop could b...