Created
December 8, 2019 12:26
-
-
Save tsubaki/ce1bd31b50459f655c96d61eb2039017 to your computer and use it in GitHub Desktop.
MonoBehaviourとComponentDataの同期
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 Unity.Entities; | |
using UnityEngine; | |
public class DisplayPlayerDistance : MonoBehaviour | |
{ | |
DistanceFromPlayerAuthoring fromPlayer; | |
void Start() | |
{ | |
fromPlayer = GetComponent<DistanceFromPlayerAuthoring>(); | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
Debug.Log(fromPlayer.Distance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment