public Prefab(AssetInfo assetInfo) : base(assetInfo) { Modification = new PrefabModification(AssetsFile); ParentPrefab = new PPtr <Prefab>(AssetsFile); RootGameObject = new PPtr <GameObject>(AssetsFile); ThisPrefab = new InnerPPtr <Prefab>(this); }
public Prefab(GameObject root) : base(CreateAssetsInfo(root)) { Modification = new PrefabModification(AssetsFile); ParentPrefab = new PPtr <Prefab>(AssetsFile); RootGameObject = new PPtr <GameObject>(root); ThisPrefab = new InnerPPtr <Prefab>(this); IsPrefabParent = true; ObjectHideFlags = 1; if (Config.IsGenerateGUIDByContent) { CalculatePrefabHash(); } }