Skip to content

Instantly share code, notes, and snippets.

View daemon3000's full-sized avatar

Cristian Geambasu daemon3000

  • Bucharest, Romania
View GitHub Profile
@daemon3000
daemon3000 / androidstudio.bat
Last active December 24, 2020 07:48
Command line execution script for android studio.
@REM Add file to OS path and run from command line with: androidstudio path/to/my/project
@echo off
start "" "%ANDROID_STUDIO_HOME%\bin\studio64.exe" %*
{
"rulesDirectory": ["node_modules/codelyzer"],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [true, "check-space"],
"component-class-suffix": true,
"component-selector": [true, "element", "kebab-case"],
"curly": true,
#region [Copyright (c) 2018 Cristian Alexandru Geambasu]
// Distributed under the terms of an MIT-style license:
//
// The MIT License
//
// Copyright (c) 2018 Cristian Alexandru Geambasu
//
// 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,
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Development Editor Win64",
"command": "${config:UE4_Root}/Build/BatchFiles/Build.bat",
"type": "shell",
"args": [
#region [Copyright (c) 2018 Cristian Alexandru Geambasu]
// Distributed under the terms of an MIT-style license:
//
// The MIT License
//
// Copyright (c) 2018 Cristian Alexandru Geambasu
//
// 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,
using UnityEngine;
using UnityEditor;
public static class pb_SaveMesh
{
[MenuItem("Tools/" + pb_Constant.PRODUCT_NAME + "/Object/Save Mesh", validate = true)]
private static bool VALIDATE_SaveSelectedMesh()
{
if(Selection.activeGameObject != null)
{
@daemon3000
daemon3000 / ControllerVibration.cs
Last active April 1, 2019 10:22
Controller vibration support for Unity
// 1. Get the InputManager plugin from: https://github.com/daemon3000/InputManager
// 2. Get the XInput wrapper unitypackage from: https://github.com/speps/XInputDotNet/releases
// 3. Import the two plugins into your project.
// 4. Open the InputAdapter.cs file from the InputManager plugin and add the following:
// 4.1. Add this at the top of the file:
using XInputDotNetPure;
// 4.2. Add this at the end of the [Static Accessors] region:
@daemon3000
daemon3000 / .gitignore
Created February 28, 2016 20:25
Ignore file for Unity projects
#Junk folders
Library/*
Temp/*
Build/*
Builds/*
Assets/UnityVS*
obj/*
#Junk files
Assembly-CSharp*
@daemon3000
daemon3000 / EnumFlagAttribute.cs
Created November 17, 2015 09:24 — forked from ChemiKhazi/EnumFlagAttribute.cs
Unity3d property drawer for automatically making enums flags into mask fields in the inspector.
using UnityEngine;
public class EnumFlagAttribute : PropertyAttribute
{
public string enumName;
public EnumFlagAttribute() {}
public EnumFlagAttribute(string name)
{
@daemon3000
daemon3000 / EnumExtensions.cs
Created September 8, 2015 13:29
Enum extension methods
#region [Copyright (c) 2015 Cristian Alexandru Geambasu]
// Distributed under the terms of an MIT-style license:
//
// The MIT License
//
// Copyright (c) 2015 Cristian Alexandru Geambasu
//
// 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,