Skip to content

Instantly share code, notes, and snippets.

@marcteys
marcteys / add_curve_ivygen.py
Last active December 7, 2021 21:25
Ivygen Upgraded
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
typedef void(*SendBluetoothMessageCallback)(const char* objectName, const char* methodName,const char* message);
...
void PluginWrite(std::string message) {
Log(message.c_str()); // ici ça marche
sendMessageCallback("truc", "PluginMessageReceived", message.c_str()); // !!! ici ça marche pas !!
}
@marcteys
marcteys / MatchEditorCamera.cs
Created July 11, 2018 09:43
MatchEditorCamera.cs
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
#endif
[ExecuteInEditMode]
public class MatchEditorCamera : MonoBehaviour {
@marcteys
marcteys / SimpleThread.cs
Created July 3, 2018 12:41
Simple Thread Unity
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
public class SimpleThread : MonoBehaviour
{
Action threadActionCallback = null;
Action mainActionCallback = null;
@marcteys
marcteys / TransparentTextureUnlitAlpha.shader
Created October 3, 2017 17:23
TransparentTextureUnlitAlpha.shader
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// Unlit alpha-blended shader.
// - no lighting
// - no lightmap support
// - no per-material color
Shader "Custom/UnlitTextureTransparent" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
var Templates = {
templates:{},
loadTemplates:function (names, callback) {
var that = this;
var loadTemplate = function (index) {
var name = names[index];
@marcteys
marcteys / GlobalDebug.js
Last active January 8, 2016 14:06
Override console.log
//GlobalDebug(true||false);
var GlobalDebug = (function () {
var savedConsole = console;
return function(debugOn,suppressAll){
var suppress = suppressAll || false;
if (debugOn === false) {
console = {};
console.log = function () { };
@marcteys
marcteys / graphic.bat
Created October 7, 2015 18:39
ADM Graphic card fix
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0001" /v KMD_EnableBrightnessInterface2 /t REG_DWORD /d "0" /f
using UnityEngine;
using System.Collections;
public class UnityClick : MonoBehaviour {
public LayerMask terrainLayer;
void Update()
{
if ( Input.GetMouseButtonDown(0))