Example #1
0
	void OnRuntimeIntance(object arg)
	{
		NcEffectBehaviour._RuntimeIntance	runtimeIntance	= (NcEffectBehaviour._RuntimeIntance)arg;
		FxmInfoIndexing					indexCom		= runtimeIntance.m_ParentGameObject.GetComponent<FxmInfoIndexing>();
		if (indexCom == null)
			return;
// 		Debug.Log(runtimeIntance.m_ParentGameObject);
// 		Debug.Log(indexCom);
// 		Debug.Log(indexCom.m_OriginalTrans);
		FxmInfoIndexing.CreateInstanceIndexing(indexCom.m_OriginalTrans, runtimeIntance.m_ChildGameObject.transform, true, true);
//		bool bRoot = indexCom.m_OriginalTrans.gameObject == FXMakerHierarchy.inst.GetSelectedGameObject();
//		FXMakerHierarchy.inst.ChangeBoundsBoxWireframe(indexCom.m_OriginalTrans.gameObject, null, bRoot, true);
  		FXMakerHierarchy.inst.OnCreateInstanceEffect(runtimeIntance.m_ChildGameObject, false, runtimeIntance.m_ParentGameObject);

	}
Example #2
0
    bool CreateCurrentInstanceEffect(GameObject gameObj)
    {
        NgUtil.LogDevelop("CreateCurrentInstanceEffect() - gameObj - " + gameObj);
        GameObject parentObj = GetInstanceRoot();

        m_bFrameCreateInstance = true;

        // 이전거 삭제
        NgObject.RemoveAllChildObject(parentObj, true);

        // 순환 참조 prefab 검사
        NcEffectBehaviour.PreloadTexture(gameObj);

        // 새로 생성
        if (gameObj != null)
        {
            GameObject createObj = (GameObject)Instantiate(gameObj);

            createObj.transform.parent = parentObj.transform;
            FxmInfoIndexing.CreateInstanceIndexing(gameObj.transform, createObj.transform, false, false);
            m_InstanceEffectObject = createObj;

            RemoveInvaildComponent(createObj);

            // Grayscale
            GetFXMakerHierarchy().OnCreateInstanceEffect(m_InstanceEffectObject, true, null);

#if (UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9)
            NgObject.SetActiveRecursively(createObj, true);
#endif

            m_FXMakerControls.SetStartTime();

            return(true);
        }
        m_InstanceEffectObject = null;
        return(false);
    }