This file contains 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.Generic; | |
using Bolt; | |
using Ludiq; | |
[UnitTitle("Delegate Event")] | |
[SpecialUnit] | |
public class DelegateEventUnit : Unit, IEventUnit, IGraphEventListener, IGraphElementWithData | |
{ | |
public class Data : IGraphElementData |
This file contains 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.Generic; | |
[ExecuteInEditMode] | |
public class ModifyColor : MonoBehaviour | |
{ | |
private static MaterialPropertyBlock materialPropertyBlock = null; | |
[SerializeField] | |
private string propertyName = "_Color"; |
This file contains 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
Shader "Custom/Rimlight" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_RimValue ("Rim value", Range(0, 1)) = 0.5 | |
} | |
SubShader { | |
Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
CGPROGRAM | |
#pragma surface surf Lambert alpha |
This file contains 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
Shader "Projector/Solid Projector" { | |
Properties{ | |
_Color("Tint Color", Color) = (1,1,1,1) | |
_ShadowTex("Cookie", 2D) = "gray" {} | |
} | |
Subshader | |
{ | |
Tags {"Queue" = "Transparent" "RenderType" = "Transparent"} | |
Pass | |
{ |
This file contains 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 UnityEditor; | |
using Cinemachine; | |
using System.Collections.Generic; | |
// To make this work, create an empty MonoBehaviour called "LowFovCameraUtility". | |
// Then, attach that script to your Cinemachine virtual cameras. | |
// If you don't want to use Cinemachine virtual cameras this script should work too, | |
// you'll just need to modify the components and variable names. | |
[CustomEditor(typeof(LowFovCameraUtility))] |
This file contains 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
#include "Callbacks.h" | |
void CallbackMap::setCallback(const std::string& callbackName, Callback callback) | |
{ | |
map[callbackName] = callback; | |
} | |
CallbackMap::Error CallbackMap::call(const std::string& callbackName, const std::string& args) | |
{ | |
auto iter = map.find(callbackName); |
This file contains 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
/* An example UE4 class derived from AActor. It plays a | |
* sound when an actor enters the bounding box, and lets | |
* the player turn a PointLight on and off using the "Use" | |
* key. It originally existed as a blueprint. */ | |
/* WallSconceCpp.h */ | |
#pragma once | |
#include "GameFramework/Actor.h" |