Esempio n. 1
0
        public void Import(Stream input, string path)
        {
            using (var reader = new BinaryReader(input))
            {
                try
                {
                    Directory.CreateDirectory(Path.GetDirectoryName(Directory.GetParent(assetPath) + "/" + path));

                    LocatorArray locatorArray = null;

                    var locatorCount = reader.ReadUInt32();
                    var type         = (LocatorType)reader.ReadUInt32();

                    IUnityThreadCommand createLocatorArrayCommand = new CreateScriptableObject <LocatorArray>(path,
                                                                                                              (createdLocatorArray) => locatorArray = createdLocatorArray);

                    var waitHandle = dispatcher.DispatchCommand(createLocatorArrayCommand);
                    waitHandle.WaitOne();

                    locatorArray.Read(type, locatorCount, reader, hashManager);
                    dispatcher.DispatchCommand(new MarkAssetsAsDirtyAndSave(locatorArray)).WaitOne();
                }
                catch (Exception e)
                {
                    Debug.LogError(e);
                    throw;
                }
            }
        }
Esempio n. 2
0
 public static void CreatePlayerParams()
 {
     CreateScriptableObject.Create <ContainerParams>();
 }
Esempio n. 3
0
 public static void CreatePlayerParams()
 {
     CreateScriptableObject.Create <WeaponParams>();
 }