This repository was archived by the owner on Mar 26, 2026. It is now read-only.
forked from vbhayden/unity-xapi-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathXAPIWrapperHelp.cs
More file actions
93 lines (78 loc) · 3.68 KB
/
Copy pathXAPIWrapperHelp.cs
File metadata and controls
93 lines (78 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
public class XAPIWrapperHelp : EditorWindow
{
// Icon for our window
private static Texture2D icon;
// Various foldout settings
private bool showInfo = false;
private bool showLRS = false;
private bool showXAPI = false;
private bool showNew = false;
private bool showEdit = false;
private Vector2 scrollView = Vector2.zero;
[MenuItem ("Window/XAPI/Wrapper Help")]
public static void OpenCreateObjectWindow ()
{
// Make the window
var window = EditorWindow.GetWindow (typeof(XAPIWrapperHelp));
// Get our icon
XAPIWrapperHelp.icon = Resources.Load("lrs-editor-icon") as Texture2D;
// Clean it up a little
window.titleContent = new GUIContent("Wrapper Help", XAPIWrapperHelp.icon);
}
void OnGUI ()
{
// Start our scrolling from the start
this.scrollView = EditorGUILayout.BeginScrollView(this.scrollView);
// Content will start here, it looks a little weird if text is immediate to space it out
EditorGUILayout.Space();
EditorGUILayout.LabelField("About the Wrapper:");
// Inform the user as to what this window even does.
EditorGUILayout.HelpBox(
string.Format(
"{0}\n\n{1}",
"This wrapper provides functions to help Unity developers communicate with a Learning Record Store (LRS).",
"This window provides a brief explanation on how to get started using it and how it works."
), MessageType.Info
);
if (this.showXAPI = EditorGUILayout.BeginToggleGroup("What is xAPI?", this.showXAPI))
{
EditorGUILayout.LabelField("From the spec:");
EditorGUILayout.HelpBox(
"The Experience API (xAPI) is a technical specification that aims to facilitate the documentation " +
"and communication of learning experiences. " +
"\n\nIt specifies a structure to describe learning experiences " +
"and defines how these descriptions can be exchanged electronically."
, MessageType.Info
);
}
EditorGUILayout.EndToggleGroup();
if (this.showLRS = EditorGUILayout.BeginToggleGroup("What is an LRS?", this.showLRS))
{
EditorGUILayout.HelpBox(
"While the xAPI specification describes how an xAPI statement must be constructed, it also describes " +
"how those statements must be received and stored by a Learning Record Store (LRS)." +
"\n\nYou can think of an LRS as a web service sitting on a database, with rules governing " +
"what information it is allowed to store and how it allows users to access that information." +
"\n\nThe default LRS in use by this wrapper is hosted by the ADL Initiative."
, MessageType.Info
);
}
EditorGUILayout.EndToggleGroup();
if (this.showInfo = EditorGUILayout.BeginToggleGroup("What are ScriptableObjects?", this.showInfo))
{
EditorGUILayout.HelpBox(
string.Format(
"{0}\n\n{1}",
"If you aren't familiar with ScriptableObjects within Unity, then you can think " +
"of them as a way of storing things that are similar in structure while containing different values. ",
"For example in Hearthstone, each card has a ScriptableObject representing its data."
), MessageType.Info
);
}
EditorGUILayout.EndToggleGroup();
EditorGUILayout.EndScrollView();
}
}