Skip to content

Commit 2ea35c8

Browse files
author
Benoit Hudson
committed
Improve comments.
1 parent 989cf18 commit 2ea35c8

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

Assets/FbxExporters/FbxPrefab.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ public static void Append<T>(ref List<T> thelist, T item)
7878
thelist.Add(item);
7979
}
8080

81+
/// <summary>
82+
/// Utility function: add an item to a dictionary.
83+
/// If the dictionary is null, create it.
84+
/// </summary>
8185
public static void Add<K,V>(ref Dictionary<K,V> thedict, K key, V value)
8286
{
8387
if (thedict == null) {
@@ -86,6 +90,11 @@ public static void Add<K,V>(ref Dictionary<K,V> thedict, K key, V value)
8690
thedict.Add(key, value);
8791
}
8892

93+
/// <summary>
94+
/// Utility function: get an entry in the dictionary, or create it,
95+
/// and return it.
96+
/// The dictionary must not be null.
97+
/// </summary>
8998
public static V GetOrCreate<K,V>(Dictionary<K,V> thedict, K key) where V : new()
9099
{
91100
V value;
@@ -99,7 +108,7 @@ public static void Add<K,V>(ref Dictionary<K,V> thedict, K key, V value)
99108
/// <summary>
100109
/// Utility function: append an item to a list in a dictionary of lists.
101110
/// Create all the entries needed to append to the list.
102-
/// The dictionary must not be null.
111+
/// The dictionary will be allocated if it's null.
103112
/// </summary>
104113
public static void Append<K, V>(ref Dictionary<K, List<V>> thedict, K key, V item)
105114
{
@@ -109,6 +118,11 @@ public static void Append<K, V>(ref Dictionary<K, List<V>> thedict, K key, V ite
109118
GetOrCreate(thedict, key).Add(item);
110119
}
111120

121+
/// <summary>
122+
/// Utility function: append an item to a list in a dictionary of lists.
123+
/// Create all the entries needed to append to the list.
124+
/// The dictionary must not be null.
125+
/// </summary>
112126
public static void Append<K, V>(Dictionary<K, List<V>> thedict, K key, V item)
113127
{
114128
GetOrCreate(thedict, key).Add(item);
@@ -117,7 +131,7 @@ public static void Append<K, V>(Dictionary<K, List<V>> thedict, K key, V item)
117131
/// <summary>
118132
/// Utility function: append an item to a list in a 2-level dictionary of lists.
119133
/// Create all the entries needed to append to the list.
120-
/// The dictionary must not be null.
134+
/// The dictionary will be allocated if it's null.
121135
/// </summary>
122136
public static void Append<K1, K2, V>(ref Dictionary<K1, Dictionary<K2, List<V>>> thedict, K1 key1, K2 key2, V item)
123137
{
@@ -138,6 +152,12 @@ public FbxPrefabException(string message) : base(message) { }
138152
public FbxPrefabException(string message, System.Exception inner) : base(message, inner) { }
139153
}
140154

155+
/// <summary>
156+
/// Representation of a hierarchy with components.
157+
///
158+
/// Converts to/from json for serialization, or initialize it from a
159+
/// Unity Transform.
160+
/// </summary>
141161
public class FbxRepresentation
142162
{
143163
/// <summary>

0 commit comments

Comments
 (0)