Пример #1
0
		/// <summary>
		/// Loads and returns the subasset at the given main path, with subasset name.
		/// </summary>
		/// <param name="mainPath">The path to the container</param>
		/// <param name="subAssetPath">The name of the subasset within the container</param>
		/// <returns>The subasset object found or null if not</returns>
		public static Object LoadSubAssetAtPath(string mainPath, string subAssetPath)
		{
			Object[] subObjects = HEU_AssetDatabase.LoadAllAssetRepresentationsAtPath(mainPath);
			if (subObjects != null)
			{
				int numSubObjects = subObjects.Length;
				for (int i = 0; i < numSubObjects; ++i)
				{
					if (subObjects[i].name.Equals(subAssetPath))
					{
						return subObjects[i];
					}
				}
			}
			return null;
		}