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
..Unity5\Editor\Data\Tools\QuicktimeTools.exe transcode -input yourvideo.mp4 -output "yourvideo.ogg" -vbr "4100000.000000" -abr "156000.000000" | |
// can use also | |
http://video.online-convert.com/convert-to-ogg |
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; | |
using UnityEngine.UI; | |
public class GetSliderValue : MonoBehaviour { | |
public YourScript yourScript; | |
void Awake () | |
{ |
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 Test : MonoBehaviour { | |
public LayerMask targetLayer; | |
Vector3 prevPos; | |
void Start () { |
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; | |
using UnityEditor; | |
public class ClearPrefs : MonoBehaviour { | |
// otherwise adjusting player settings resolution wont do anything.. | |
// http://answers.unity3d.com/questions/516517/why-doesnt-standalone-build-resolution-settings-af.html | |
[MenuItem("Edit/Reset Playerprefs")] |
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; | |
// modified from : http://docs.unity3d.com/ScriptReference/Mesh-uv.html | |
public class PlanarUVMap : MonoBehaviour { | |
public bool flipX=false; | |
void Start() |
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
// http://answers.unity3d.com/questions/21796/disable-warning-messages.html | |
#pragma warning disable 0168 // variable declared but not used. | |
#pragma warning disable 0219 // variable assigned but not used. | |
#pragma warning disable 0414 // private field assigned but not used. | |
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
float Remap(float source, float sourceFrom, float sourceTo, float targetFrom, float targetTo) | |
{ | |
return targetFrom + (source-sourceFrom)*(targetTo-targetFrom)/(sourceTo-sourceFrom); | |
} | |
// https://forum.unity.com/threads/re-map-a-number-from-one-range-to-another.119437/ |
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
// ignore mouse clicks for UI | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class FixMouseClicksForUI : MonoBehaviour | |
{ | |
GameObject lastselect; |
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
// ==UserScript== | |
// @name AssetStoreBuddy | |
// @namespace unitycoder.com | |
// @include https://www.assetstore.unity3d.com/en/#!/search/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// currently need to press F5 to run these |
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; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
// http://forum.unity3d.com/threads/eventtrigger-move-issue.325103/#post-2114563 | |
public class TrackMouseOverUI: MonoBehaviour, IPointerEnterHandler, IPointerExitHandler | |
{ | |
// Called when the pointer enters our GUI component. |