Toolkit for ARCore in Unity Platform based on Example of ARCore
- Add
ARCorekit ControllerPrefab fromAssets/ARCoreKit/Toolkit/ARCorekit Controller.prefabto your Unity Scene
- Create the script that has
void OnNewPlanesDetected(List<TrackedPlane> trackedPlanes)to get new planes. - In your script, add
GameObject.FindObjectOfType<PlaneStreamer>().Register(gameObject);to yourStart()method. - You can look on our
PlaneGeneratoras example of this.
It is used for generating plane based on plane prefab that has PlaneBehaviour.
- Add
Plane GeneratorPrefab fromAssets/ARCoreKit/Toolkit/Plane Generator.prefabto your Unity Scene. - Drag
Plane PrefabandPlane MaterialtoPlane Generator
In this toolkit, we provide PlaneCollider Prefab which is worked with colliding to rigidbody of Unity.
- Create the script that has
void OnUpdateMesh(Mesh mesh)method. - Add this script to your plane that has
Plane Behaviourscript. - Based on mesh in
OnUpdateMesh, you can use it to customize your own plane.
For moreunderstanding, we provide example scene in this toolkit. You can check or build it at Assets/ARCoreToolkit/Example/Scenes/ExampleScene.unity.