Skip to content

Instantly share code, notes, and snippets.

Tim Cooper stramit

Block or report user

Report or block stramit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fxpass.cs
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.LightweightPipeline;
[ImageEffectAllowedInSceneView]
public class WaterFXPass : MonoBehaviour, DefaultRendererSetup.IAfterSkyboxPass
{
private WaterFXPassImpl m_WaterFXPass;
View MyLWRenderer.cs
using System;
using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.LightweightPipeline
{
/// <summary>
/// A Custom tweaking of the LWRP using the passes system, in this example a 'WaterFXPass' is added
/// </summary>
public class MyLWRenderer : MonoBehaviour, IRendererSetup
{
@stramit
stramit / package.json
Created Jun 1, 2018
Example Project Manifest
View package.json
{
"dependencies": {
"com.unity.postprocessing": "file:../ScriptableRenderPipeline/com.unity.postprocessing",
"com.unity.render-pipelines.core": "file:../ScriptableRenderPipeline/com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:../ScriptableRenderPipeline/com.unity.shadergraph",
"com.unity.render-pipelines.lightweight": "file:../ScriptableRenderPipeline/com.unity.render-pipelines.lightweight"
}
}
@stramit
stramit / SpecialEventClass.cs
Last active Nov 21, 2018
SpecialEventClass
View SpecialEventClass.cs
/*
* When developing the UI system we came across a bunch of things we were not happy
* with with regards to how certain events and calls could be sent in a loosely coupled
* way. We had this requirement because with a UI you tend to implement widgets that receive
* certain events, but you don't really want to have lots of glue code to manage them
* and keep track of them. The eventing interfaces we developed helped with this. One of
* the interesting things, is that they are not justfor the UI system! You can use this as
* a type-safe, fast, and simple alternative to SendMessage (never use SendMessage!).
* So how does it all work?
@stramit
stramit / TouchInputModule.cs
Created Sep 23, 2014
TouchInputModule (b19)
View TouchInputModule.cs
using System.Text;
namespace UnityEngine.EventSystems
{
[AddComponentMenu("Event/Touch Input Module")]
public class TouchInputModule : PointerInputModule
{
protected TouchInputModule()
{}
@stramit
stramit / Text.cs
Created Sep 22, 2014
Text Element
View Text.cs
using System;
using System.Collections.Generic;
using System.Text;
namespace UnityEngine.UI
{
/// <summary>
/// Labels are graphics that display text.
/// </summary>
View ScrollRect.cs
using System;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[AddComponentMenu ("UI/Scroll Rect", 33)]
[SelectionBase]
[ExecuteInEditMode]
@stramit
stramit / Shadow.cs
Created Sep 18, 2014
Vertex Effect Example
View Shadow.cs
using System.Collections.Generic;
namespace UnityEngine.UI
{
[AddComponentMenu ("UI/Effects/Shadow", 14)]
public class Shadow : BaseVertexEffect
{
[SerializeField]
private Color m_EffectColor = new Color (0f, 0f, 0f, 0.5f);
@stramit
stramit / CustomEvents.cs
Created Sep 4, 2014
Sending Custom Events via the EvenSystem
View CustomEvents.cs
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}
View ContentSizeFitter.cs
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[AddComponentMenu("Layout/Content Size Fitter", 141)]
[ExecuteInEditMode]
[RequireComponent (typeof (RectTransform))]
public class ContentSizeFitter : UIBehaviour, ILayoutSelfController
{
You can’t perform that action at this time.