Ejemplo n.º 1
0
    static NgAsset.ObjectNode[] ArrayListToObjectNodes(ArrayList retArray)
    {
#if UNITY_WEBPLAYER
        Debug.LogError("In WEB_PLAYER mode, you cannot run the FXMaker.");
        Debug.Break();
        return(null);
#else
        NgAsset.ObjectNode[] retObjs = new NgAsset.ObjectNode[retArray.Count];

        for (int n = 0; n < retArray.Count; n++)
        {
            retObjs[n] = new NgAsset.ObjectNode();
            if (retArray[n] is string)
            {
                retObjs[n].m_Object    = null;
                retObjs[n].m_AssetPath = (string)retArray[n];
            }
            else
            {
                retObjs[n].m_Object    = (Object)retArray[n];
                retObjs[n].m_AssetPath = AssetDatabase.GetAssetPath(retObjs[n].m_Object);
            }
        }
        return(retObjs);
#endif
    }
Ejemplo n.º 2
0
    void CreatePrefab(NgAsset.ObjectNode modelNode)
    {
        string     targetPath = NgFile.CombinePath("Assets/" + m_tarPrefabPath, NgFile.GetFilename(modelNode.m_AssetPath) + ".prefab");
        GameObject loadPrefab = NgAsset.LoadPrefab(targetPath);

        if (loadPrefab != null)
        {
            // 있으면 pass
            return;
        }
        PrefabUtility.CreatePrefab(targetPath, (GameObject)modelNode.m_Object);
        AssetDatabase.SaveAssets();
        AssetDatabase.SaveAssets();
    }
Ejemplo n.º 3
0
	static NgAsset.ObjectNode[] ArrayListToObjectNodes(ArrayList retArray)
	{
#if UNITY_WEBPLAYER
		Debug.LogError("In WEB_PLAYER mode, you cannot run the FXMaker.");
		Debug.Break();
		return null;
#else
		NgAsset.ObjectNode[]	retObjs = new NgAsset.ObjectNode[retArray.Count];

		for (int n = 0; n < retArray.Count; n++)
		{
			retObjs[n] = new NgAsset.ObjectNode();
			if (retArray[n] is string)
			{
				retObjs[n].m_Object		= null;
				retObjs[n].m_AssetPath	= (string)retArray[n];
			} else {
				retObjs[n].m_Object		= (Object)retArray[n];
				retObjs[n].m_AssetPath	= AssetDatabase.GetAssetPath(retObjs[n].m_Object);
			}
		}
		return retObjs;
#endif
	}