WARP gce is now available


WARP gce - Only (good) Space Trader in Game Center

---------

Download from iTunes - it's FREE!


Wednesday, November 19, 2014

Unity Full Project Export

I tweak, patch and update many of the assets I purchase / download from the Asset Store. When creating packages (exports) I struggled to create an export that included the "Project Settings" folder where nifty things like the TagManager, LayersManager and InputManager all reside. Sure the old method of zipping up the folder and placing the .zip file inside the Assets folder would work but was extremely clunky.

A quick search on the Unity Answers section led me to an Editor based(1) script that would create a full project export; including the Settings folder. Sweet!

Here is the script, in all its glory!

using UnityEditor;
using UnityEngine;

public class FullExport : MonoBehaviour {


    [MenuItem("Tools/Full Export")]
    private static void NewMenuOption()
    {
        string fileName = "FullProject_Export.unitypackage";
        AssetDatabase.ExportPackage("Assets"fileNameExportPackageOptions.Interactive | ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets|ExportPackageOptions.IncludeDependencies);
        Debug.Log(fileName + " is located in this projects root folder");
    }
}
To "run" the script, after installing just look at the menubar for "Tools" and then choose "Full Export".



You can download the script already set inside an "Editor" folder which is inside an "_Exporter" folder.


(1) Editor scripts MUST be located inside a folder called "Editor". The folder can be a subfolder AND you can have as many as you want(2) .
(2) Just like the "Resources" folder, they can be scattered through out your project and all will be merged when building your app.

Wednesday, November 12, 2014

Unity 3D ErrorManager v1.1 (text logging)

Edit: Use this with Unity 4.6 and newer; for Unity 4.5 and older, please see THIS post

While I've named it ErrorManager; it could just as easily have been named TextLogManager because it can be use for so much more than just errors.



Here's the top part of the C# file - see below for download link
/// <summary>
/// ErrorLogManager 
///     - Primaryused to log errors to text file
/// 
/// Created byGregory Meach
/// DateNovember 122014
/// Version1.1 (Updated for Unity 4.6)
/// 
/// LicenseDo what you wantno credit necessary
/// LiabilityNone whatsoever.
/// 
/// Example: (called from ANY other class)    
///     ErrorLogManager.sharedManager.UpdateErrorLog("fakeMethod","not found",ErrorLogManager.sharedManager.GetErrorDate());
/// Note:
///     GetErrorDate() helper returns "nowas a string
///
/// </summary>

public class ErrorLogManager : MonoBehaviour {
    
    #region ErrorLog
    [Serializable]
    public class ErrorData {
        public string method;
        public string error;
        public string dateString;
    }
    public List<ErrorDataErrorList = new List<ErrorData>();
    private string currentLogName = string.Empty;
    private string logInitText = string.Empty;
    private bool isFirstSave = true;

    // Set this to whatever name you want to use
    private string errorLogName = "Game_ErrorLog";

    // Set this to the maximum log entries before they are auto-saved
    private int maxLogEntriesBeforeSave = 30;

    // Set this to TRUE to overwrite the log file on startup
    private bool clearErrorLogOnStartup = false;

    // Set this to FALSE to overwrite the log file on startup
    private bool useTimeStampInFileName = true;

    // Helper methods
    public string GetErrorDate() { return System.DateTime.Now.ToString("s"); }
    public string GetSavedDataPath() { return (Application.persistentDataPath + Path.DirectorySeparatorChar); }
    public string GetFileDate() { 
        string dateString = System.DateTime.Now.ToString("d"); 
        dateString = dateString.Replace("/",".");
        return dateString;
    }

    public void UpdateErrorLog(string callingMethodstring errorMsgstring errorDate) {
        ErrorData newError = new ErrorData();
        newError.method = callingMethod;
        newError.error = errorMsg;
        newError.dateString = errorDate;
        ErrorList.Add(newError);
        if (ErrorList.Count > maxLogEntriesBeforeSave)
            FlushErrorLog();
    }

Here's the package link: ErrorManager_v1.1.unitypackage

Tuesday, October 28, 2014

Icon Set Creator v3.0 (iOS 8)


Previous post here: iOS Icon set Creator

So here's what the updated Automator workflow does:
Asks for your base (1024x1024) icon image then duplicates it, scales it and renames it, rinse and repeat until all twelve  (12) icons are created.

Notes: You can use the 1024 size icon to upload to iTunes Connect. Icon names have been revised to match Xcode 6 for easy drag and drop.

File listing:
iPad76@2x.png
iPad76.png
iPad40@2x.png
iPad40.png
iPad29@2x.png
iPad29.png
iPhone40@2x.png

iPhone60@2x.png
iPhone29@2x.png
iPhone60@3x.png
iPhone40@3x.png
iPhone29@3x.png


The workflow WILL NOT overwrite any existing files so make sure to put your base image in its own folder.

1000 words..... (very, very old screenshots...)

Test folder with 1024 icon (can be named whatever you want)

Launch Automator app and click the Run button...
Browse to and select your 1024 icon file
This is where the "magic" happens (lol!)

Completed folder with shiny new icons, yeah!
(Very old image)

In the zip file is a second Automator "application" named "Create iOS Iconset Droplet iOS8". You don't run this application you simply drop your 1024 icon onto it and the magic happens... sweet right? I know... :-]

To use the droplet, just drag the droplet to your Dock. Now when you need a set of icons, place your master image in a folder, then drag it on top of the droplet and give it about 3 seconds and its done. This has a permanent home in my Dock.


Download link: CLICK ME