Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
31 lines
683 B
C#
31 lines
683 B
C#
using UnityEngine;
|
|
|
|
namespace Wizard;
|
|
|
|
internal class TransformBackup
|
|
{
|
|
public Transform backup_parent { get; private set; }
|
|
|
|
public Vector3 backup_pos { get; private set; }
|
|
|
|
public Vector3 backup_scale { get; private set; }
|
|
|
|
public int backup_layer { get; private set; }
|
|
|
|
public void Save(Transform trans)
|
|
{
|
|
backup_parent = trans.parent;
|
|
backup_pos = trans.localPosition;
|
|
backup_scale = trans.localScale;
|
|
backup_layer = trans.gameObject.layer;
|
|
}
|
|
|
|
public void Restore(Transform trans)
|
|
{
|
|
trans.parent = backup_parent;
|
|
trans.localPosition = backup_pos;
|
|
trans.localScale = backup_scale;
|
|
trans.gameObject.layer = backup_layer;
|
|
}
|
|
}
|