Skip to content

Instantly share code, notes, and snippets.

View andreiagmu's full-sized avatar
🎮
Developing NekoSuki! ~ Kitty Love Adventure 🐈❤️

Andrei Müller (Andy Miira) andreiagmu

🎮
Developing NekoSuki! ~ Kitty Love Adventure 🐈❤️
View GitHub Profile
@lazlo-bonin
lazlo-bonin / UndoUtility.cs
Last active January 29, 2024 11:24
Fixing Unity's broken Undo.RecordObject
using UnityEditor;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace Ludiq
{
public static class UndoUtility
{
private static void RecordObject(UnityObject uo, string name)
{
@StewMcc
StewMcc / WwiseIDConverter.cs
Created December 21, 2017 13:15 — forked from wavebit/WwiseIDConverter.cs
Wwise ID Converter #Wwise
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
internal class WwiseIDConverter {
private enum State {
Init,
@snlehton
snlehton / UIFollow.cs
Created December 19, 2017 12:08
A simple Unity example script that makes a UI component track position of world space object rendered with specific world space camera. Canvas needs to be in Screen Space Camera mode.
// A simple Unity example script that makes a UI component track position of world space object rendered with
// specific world space camera. Canvas needs to be in Screen Space Camera mode.
[ExecuteInEditMode]
public class UIFollow : MonoBehaviour
{
[Tooltip("World space object to follow")]
public GameObject target;
[Tooltip("World space camera that renders the target")]
public Camera worldCamera;
[Tooltip("Canvas set in Screen Space Camera mode")]
@JohannesDeml
JohannesDeml / EditPrefabInScene.cs
Last active May 17, 2023 04:40 — forked from ulrikdamm/EditPrefab.cs
Unity editor script for better editing of prefabs. Put in Assets/Editor.
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;
// From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec
// Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs
@ulrikdamm
ulrikdamm / EditPrefab.cs
Last active May 10, 2023 07:44
Unity editor script for better editing of prefabs. Put in Assets/Editor.
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs
public class EditPrefab {
static Object getPrefab(Object selection) {
@p2or
p2or / blender-merge-vertex-groups.py
Last active October 24, 2023 14:50
Merge Vertex Groups #Blender
import bpy
group_input = {"Group", "Group.001", "Group.002"}
ob = bpy.context.active_object
group_lookup = {g.index: g.name for g in ob.vertex_groups}
group_candidates = {n for n in group_lookup.values() if n in group_input}
# test whether all candidates components of group_lookup
if all(n in group_lookup.values() for n in group_candidates):
@mattatz
mattatz / ComponentUtil.cs
Last active April 18, 2024 03:04
CopyComponent by Script for Unity
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
namespace Utils
{
@alphamu
alphamu / Android Privacy Policy Template
Created February 9, 2017 03:17
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@Seneral
Seneral / RTEditorGUI.cs
Last active October 3, 2022 07:42
Extended editor GUI controls for runtime usage in Unity. Includes runtime-compatible editor control ports, new controls and fields, advanced texture drawing utilities, general texture utilities and efficient clipped bezier drawing. Bezier drawing needs line texture www.dropbox.com/s/2qn3q3nwhny17ok and (optional) GUIScaleUtility gist
using UnityEngine;
using System;
using System.Globalization;
using System.Linq;
using System.Collections.Generic;
using Object = UnityEngine.Object;
namespace NodeEditorFramework.Utilities
{
@svermeulen
svermeulen / MultiSceneSetup.cs
Created October 23, 2016 17:32
Simple editor script to save and load multi-scene setups within Unity3D
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor.SceneManagement;
using UnityEditor;
using System.Collections;
using System.Linq;
public class MultiSceneSetup : ScriptableObject
{