Skip to content

Instantly share code, notes, and snippets.

@Nobuyuki-Kobayashi
Created May 4, 2019 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Nobuyuki-Kobayashi/a30aed4d8ff240535933f9aa714278ee to your computer and use it in GitHub Desktop.
Save Nobuyuki-Kobayashi/a30aed4d8ff240535933f9aa714278ee to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.PostProcessing.Utilities;
public class FocusPullerHelper : MonoBehaviour {
private Transform focusObj;
private FocusPuller focusPuller;
private Transform _target;
private Transform target {
get { return _target; }
set { _target = value; }
}
void Awake()
{
focusPuller = GetComponent<FocusPuller>();
}
// Use this for initialization
void Start () {
//フォーカスを合わせる対象にタグ"FocusObj"をつけておくこと.
focusObj = GameObject.FindGameObjectWithTag("FocusObj").transform;
focusPuller.target = focusObj;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment