==== Share project with others ====
* For you:
* Right-click your project folder in Project view > Export package > Export (make sure everything is selected) > Choose a place > Send him the package
* Someone:
* Create new project > File > Open Scene > Double clicks it
==== Unity object, asset, prefab, and package ====
* component: fundamental ingredients such as button, text, image, audio, etc.
* game object: a basic container of components
* asset: a file representing any item that can be used in the project
* prefab: a saved, fully configured GameObject that can be used in other scenes or projects
* package: a collection of files and data for a Unity project stored in a single file
==== Orbiting/Rotating Earth on a tilted axis ====
https://www.youtube.com/watch?v=oW9gzkR1yuw
==== Physically Based Sky Virtual Sky ====
{{page>.HDRP_PBS_Sky}}
There is a free asset called, **SimplerKeplerOrbits**, in the Unity asset store. It has three sample scenes and we can use this package as the starting point to create our desired Solar System simulation. Especially, check Example 3 in the included scenes which allows users' tilting and zooming actions in the rendered window (i.e. in the GamePlay mode), and it also allows to set the observing date (set to "now" automatically). There is a UI slider that can speed up and go backward in time as well. Nice! We can recycle most of these in our 3-D model.
We can create a realistic Solar System model with three free Unity assets (Simple Kepler Orbits, Planets of the Solar System, and MilkyWay).
For example, we can create a simple model by following the sequence of operations below.
- Start a new 3D Unity project
- Set project setting (Edit -> Project Settings; pay attention to Graphics [Rendering], Quality etc.)
- Import necessary assets (Package Manager: Install assets from My Assets)
- In the main camera setting, choose the right Renderer and select "Post Processing". Choose the MilkyWay skybox (drag one onto the main camera).
- Create three objects (two spheres and one object). You can drag and drop Sun and Earth from "Planets of the Solar System". One sphere is an attractor (i.e., the central star), the other sphere is an orbiting object (e.g., Earth), and the 3rd object is a velocity indicator. **This is an easy approach, but in our desired model, we want to calculate orbital motion by solving Kepler equation in conjunction with six orbital elements.**
- Drag and drop "KeplerOrbitMover" script on the orbiting object. Drop "KeplerOrbitLineDisplay" on the orbiting object as well if orbits need to be displayed with curves.
- Then, select the central object as the attractor and set the right mass value.
- Set velocity handle, length scale, and time scale.
- Render and you can see an animation.
* Check "Fast Script Reload" asset which may decrease the loading time of the script.
{{page>.:SunEarthMoon}}
----
=== Sample WebGL model of the Sun-Earth-Moon System ===
This embedded WebGL rendering of the Sun-Earth-Moon system created with Unity can be played in any modern web browser. The right mouse button can tilt/rotate the scene, the middle mouse button scroll adjusts a zoom level. Click the image below to access the model.
[[https://cosmos.physast.uga.edu/research/WebGLs/SEM/index.html|{{tech:tutorials:webgl_sem.png?800}}]].
=== Setup VR with a Quest Headset ===
Detailed step-by-step tutorial (created by Ricky Correia):{{ :tech:tutorials:unity_to_vr.docx |}}
General Steps:
- Create a Meta account
- Enable Developer mode
- Enable Quest Link
- Meta Quest Developer Hub (MQDH)
MicroSoft also has this tutorial: [[https://learn.microsoft.com/en-us/azure/remote-rendering/quickstarts/deploy-to-quest|MS + Quest]]
----
=== Creating AR ===
[[https://www.youtube.com/watch?v=gpaq5bAjya8|This video]] describes the steps to create an AR video using Unity. Blender files can be imported to Unity.
----
=== Render 2+ camera views ===
Create cameras as you need. Then, change the "Viewport Rect" (Width and Height and X & Y) to set the desired location and size you need. In the render view then, you will have more than one camera views.
----
=== Display UI info and tools ===
You can add many UI components in three different ways in Unity by changing the "Render Mode": (1) screen overlay (always displayed on screen), (2) camera space (displayed over camera view), and (3) world space (as if they are regular objects).