Skip to content

Instantly share code, notes, and snippets.

View Geri-Borbas's full-sized avatar
💡

Geri Borbás Geri-Borbas

💡
View GitHub Profile
@Geri-Borbas
Geri-Borbas / DebugConsole.cs
Last active October 26, 2019 11:48
Clear Unity Editor Console.
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// 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, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
@Geri-Borbas
Geri-Borbas / AllEditorAssetNames.txt
Last active January 11, 2023 03:06
Asset names in the Unity Editor Asset Bundle. More at http://eppz.eu/blog/unity-editor-icon-assets/
avatar/arrow.fbx, arrow, UnityEngine.GameObject
avatar/defaultavatar.fbx, DefaultAvatar, UnityEngine.GameObject
avatar/defaultgeneric.fbx, DefaultGeneric, UnityEngine.GameObject
avatar/dial_flat.prefab, dial_flat, UnityEngine.GameObject
avatar/dude.fbm/body normal.tga, body normal, UnityEngine.Texture2D
avatar/dude.fbm/body_color_map.tga, body_color_map, UnityEngine.Texture2D
avatar/dude.fbm/body_specular_map.tga, body_specular_map, UnityEngine.Texture2D
avatar/dude.fbm/eyes_color_map.tga, eyes_color_map, UnityEngine.Texture2D
avatar/dude.fbm/eyes_specular_map.tga, eyes_specular_map, UnityEngine.Texture2D
avatar/dude.fbm/face normal.tga, face normal, UnityEngine.Texture2D
@Geri-Borbas
Geri-Borbas / SaveEditorDefaultResources.cs
Last active March 23, 2020 09:46
Snippet to export Unity Editor Assets for inspection. Read more at http://eppz.eu/blog/unity-editor-icon-assets/
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// 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, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
@Geri-Borbas
Geri-Borbas / SelectByLayer.cs
Last active May 9, 2017 15:39
Simple Unity Editor tool to select all GameObjects on a given Layer.
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// 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, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
@Geri-Borbas
Geri-Borbas / OverrideAppDelegate.m
Last active March 19, 2021 09:20
A quick way to override / extend app delegate (UIAppDelegate) in iOS Unity Player. Read more on why you should / should not use this approach at http://eppz.eu/blog/override-app-delegate-unity-ios-osx-1/
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// 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, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
@Geri-Borbas
Geri-Borbas / Define.cs
Last active June 19, 2017 02:02
Create Scripting Define Symbol from script for the selected Build Target in Unity.
using System;
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public class Define
{
const string define = "LIBRARY_IS_AVAILABLE";
@Geri-Borbas
Geri-Borbas / Object.php
Created June 28, 2017 14:27
Get class public properties in php using 'get_object_vars'.
<?php
class Inspector
{
public static function get_object_public_vars($object)
{ return get_object_vars($object); }
}
class Object
{
@Geri-Borbas
Geri-Borbas / multiple_tasks.json
Last active July 11, 2017 15:11
Chain up multiple VS Code tasks (Build, Test) in tasks.json.
{
"version": "2.0.0",
"tasks":
[
{
"taskName": "Build",
"isBuildCommand": true,
"command": "/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/bin/xbuild",
"args":
[
@Geri-Borbas
Geri-Borbas / test.command
Last active February 27, 2019 18:21
Run Unity Editor Tests from command line. See https://gist.github.com/eppz/e566781bb20abf6df09469515d07ae83 for tasks.json. Don't forget to make it executable using chmod +x.
#!/bin/sh
UNITY_EXECUTABLE="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PROJECT_FOLDER="$1"
RESULTS_FILENAME="$2"
RESULTS_FILEPATH="$PROJECT_FOLDER/$RESULTS_FILENAME"
echo "Testing Unity project: $PROJECT_FOLDER"
echo "Running Unity.app (batch mode, run tests)..."
@Geri-Borbas
Geri-Borbas / Unity_build_and_test_tasks.json
Last active October 4, 2018 18:55
VS Code tasks to build and test (!) with Unity. See https://gist.github.com/eppz/ad4fb8d64bdcb0c50a6abea57716823e for test.comman.
{
"version": "2.0.0",
"tasks":
[
{
"taskName": "Build",
"isBuildCommand": true,
"command": "/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/bin/xbuild",
"args":
[