Complete API documentation for all scripts and components in the Life in Between XR project.
Data structure representing a transit line.
Namespace: Global
Type: [System.Serializable] class
| Property | Type | Description |
|---|---|---|
name |
string |
Name of the transit line (e.g., "Red Line", "Blue Line") |
selected |
bool |
Whether this line is currently selected by the user |
color |
Color |
Visual color representation of the line |
button |
GameObject |
Associated UI button GameObject for this line |
// Create a new line
Line redLine = new Line {
name = "Red Line",
selected = false,
color = Color.red,
button = redLineButtonGameObject
};
// Check if line is selected
if (redLine.selected) {
Debug.Log($"{redLine.name} is selected");
}File Location: Assets/Scripts/Line.cs
Manages transit line selection logic and state.
Namespace: Global
Type: MonoBehaviour
| Property | Type | Description |
|---|---|---|
LinesList |
List<Line> |
List of all available transit lines |
Selects a specific line and deselects all others.
Parameters:
selectedLineName(string): The name of the line to select
Behavior:
- Iterates through
LinesList - Sets
selected = truefor matching line - Sets
selected = falsefor all other lines
Example Usage:
LineSelector selector = GetComponent<LineSelector>();
// Select the Red Line
selector.SelectLine("Red Line");
// Verify selection
foreach (Line line in selector.LinesList) {
if (line.selected) {
Debug.Log($"Selected: {line.name}");
}
}File Location: Assets/Scripts/LineSelector.cs
Data structure representing a transit stop.
Namespace: Global
Type: [System.Serializable] class
| Property | Type | Description |
|---|---|---|
name |
string |
Name of the transit stop |
Color classification for transit stops.
Values:
redbluegreenyellow
// Create a new stop
Stop station = new Stop {
name = "Central Station"
};
// Use color enum (example)
// Note: The enum is defined but not currently used as a propertyFile Location: Assets/Scripts/Stop.cs
Manages UI state and visibility, ensuring proper UI element coordination.
Namespace: Global
Type: MonoBehaviour
| Property | Type | Description |
|---|---|---|
searchDropdown |
GameObject |
The search dropdown UI element |
selectorBar |
GameObject |
The line selector bar UI element |
The Update() method runs every frame and:
- Hides the selector bar when the search dropdown is active
- Shows the selector bar when the search dropdown is inactive
This ensures only one UI element is visible at a time, preventing UI overlap.
UIManager uiManager = GetComponent<UIManager>();
// Assign UI elements via Inspector or code
uiManager.searchDropdown = searchDropdownGameObject;
uiManager.selectorBar = selectorBarGameObject;
// The Update() method automatically manages visibilityFile Location: Assets/Scripts/UIManager.cs
Building information is stored in CSV format.
Location: Assets/Map Info/MITBuildings.csv
Format: CSV file with building data (structure may vary)
Usage: Loaded and parsed at runtime for building information display.
The application uses the Rotary Heart AutoComplete package.
Package Location: Assets/Rotary Heart/AutoCompletePopup/
Static class for editor-time autocomplete text fields.
Namespace: RotaryHeart.Lib.AutoComplete
Documentation: See package documentation in Assets/Rotary Heart/AutoCompletePopup/Documentation.pdf
Runtime autocomplete prefab component.
Namespace: RotaryHeart.Lib.AutoComplete
Type: MonoBehaviour
Key Methods:
- Search functionality
- Item selection callbacks
- UI management
using RotaryHeart.Lib.AutoComplete;
// In editor scripts
string result = AutoCompleteTextField.EditorGUILayout.AutoCompleteTextField(
currentText,
searchOptions,
allowCustom: true
);AR functionality is provided by Unity's AR Foundation.
Key Components:
ARPlaneManager: Detects horizontal/vertical planesARAnchorManager: Manages AR anchorsARRaycastManager: Performs raycasts in AR space
Documentation: Unity AR Foundation Documentation
3D mapping and visualization.
Integration: See ArcGIS SDK documentation for specific API usage.
Data: 3D models in Assets/3D Map/
Location search and filtering.
Usage: Integrated for location search functionality.
Configuration: API key should be stored securely (see setup-guide.md)
| Scene | Purpose | Location |
|---|---|---|
Scene00_MainMenu.unity |
Main menu scene | Assets/Scenes/ |
Test00_Autocomplete.unity |
Autocomplete testing | Assets/Scenes/ |
Test01_3dMap.unity |
3D map testing | Assets/Scenes/ |
WoOz_00_Videogame.unity |
Demo/prototype scene | Assets/Scenes/ |
- Create a
Lineobject with appropriate properties - Add to
LineSelector.LinesList - Create associated UI button
- Assign button to
Line.buttonproperty
- Create a
Stopobject - Add to your stop management system
- Associate with appropriate
Line
Extend UIManager to add custom UI coordination logic:
public class CustomUIManager : UIManager {
void Update() {
base.Update(); // Call base implementation
// Add custom logic
}
}- Always validate inputs before calling methods
- Check for null references when accessing GameObjects
- Use Inspector assignment for GameObject references when possible
- Follow naming conventions (PascalCase for classes, camelCase for variables)
- Document custom extensions to the API
Last Updated: 2024