Skip to content

Instantly share code, notes, and snippets.

@Nobuyuki-Kobayashi
Created April 18, 2018 15:49
Show Gist options
  • Save Nobuyuki-Kobayashi/78c87dfc000d6a05be719f41d89f37a1 to your computer and use it in GitHub Desktop.
Save Nobuyuki-Kobayashi/78c87dfc000d6a05be719f41d89f37a1 to your computer and use it in GitHub Desktop.
Unity:BeautifyDOFHelper.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using BeautifyEffect;
public class BeautifyDOFHelper : MonoBehaviour {
public Transform dOFtarget;
GameObject mainCamera;
Beautify beautify;
public virtual Transform depthOfFieldTargetFocus{
get;
set;
}
void Awake(){
mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
beautify = mainCamera.GetComponent<Beautify>();
}
void Start () {
beautify.depthOfFieldTargetFocus = dOFtarget;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment