public bool SaveProject()
    {
        if (m_bChangePrefab == false)
        {
            return(false);
        }
        if (FXMakerMain.inst.GetOriginalEffectObject() == null || FXMakerMain.inst.GetOriginalEffectPrefab() == null)
        {
            return(false);
        }

        if (0 < IsReadOnlyFolder())
        {
            NgUtil.LogMessage(FXMakerTooltip.GetHsToolMessage("READONLY_NOTSAVE", ""));
        }
        else
        {
            if (0 <= m_nEffectIndex && m_nEffectIndex < m_nEffectCount)
            {
                NgUtil.LogDevelop("SaveProject - FXMaker prefab");
                m_EffectPrefabs[m_nEffectIndex] = FXMakerAsset.SaveEffectPrefab(FXMakerMain.inst.GetOriginalEffectObject(), FXMakerMain.inst.GetOriginalEffectPrefab());
                // clear current
                FXMakerMain.inst.ClearCurrentEffectObject(m_CurrentEffectRoot, true);
                SetCurrentEffectPrefab(m_EffectPrefabs[m_nEffectIndex]);
                // Baground Reload
                FXMakerBackground.inst.UpdateBackground();
                return(true);
            }
        }
        return(false);
    }
Exemplo n.º 2
0
 public void SaveBackgroundPrefab()
 {
     NgUtil.LogDevelop("SaveBackgroundPrefab - FxmBack prefab");
     m_BackgroundPrefabs[m_nBackgroundIndex] = FXMakerAsset.SaveEffectPrefab(m_CurrentBackgroundInfo.gameObject, m_BackgroundPrefabs[m_nBackgroundIndex]);
     ShowBackground(true, true);
 }