This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AssetBundle Exporter v.1.0 | |
// Copyright (C) 2013 Sergey Taraban <http://staraban.com> | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARIS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class 2DEnemyController : MonoBehaviour { | |
// should we flip our enemy? | |
public bool isFlipped = false; | |
// used for Rotation | |
private Vector3 r = Vector3.zero; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy the function below and put it into your Web Template and build and launch for Web. | |
// | |
//function WebRender(base64) { | |
// console.log(base64); | |
// var img=document.createElement("img"); | |
// img.alt="Render"; | |
// img.src="data:image/png;base64,"+base64; | |
// document.body.appendChild(img); | |
//} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this file in the folder Editor | |
// 2015 | |
// Sean Loper | |
// TransformEditor 1.1 | |
// HUD For sceneview | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sean Loper | |
// Hourly Bonus Mechanic 1.0 | |
// Very simple to expand and static functions for easy calling | |
// also simple bool checks with custom hour input. | |
// You can easily add your own saving and loading function check before | |
// the calculations of thisTime and lastTime; | |
using System; | |
using UnityEngine; | |
using System.Collections; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
public class Screenshot { | |
// basic capture method | |
public static void Capture(){ | |
string screenshotIMGName = DateTime.Now.ToString(); | |
string subString = screenshotIMGName.Replace ('/','_'); | |
string gypsy = subString.Replace(':','_'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You'll have to call these functions atleast once, on load of the game just to ensure your work isn't being stolen. | |
using UnityEngine; | |
using System.Collections; | |
public class SiteLock { | |
public static void WWWLock (string Domain) { | |
Application.ExternalEval("if(document.location.host != '" + Domain + "') { document.location='" + Domain + "'; }"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ExampleManager : MonoBehaviour | |
{ | |
static public ExampleManager sharedManager | |
{ | |
get | |
{ | |
return MonoBehaviourUtility.GetManager<ExampleManager>( ref _sharedManager ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
public class ActionTest : MonoBehaviour { | |
// Use this for initialization | |
private void Awake () { | |
string url = "http://google.com"; | |
StartCoroutine(WaitForRequest(url,(status)=>{ |