コード例 #1
0
ファイル: Utils.cs プロジェクト: decentraland/unity-renderer
        internal static void MarkAssetForAssetBundleBuild(IAssetDatabase assetDb, UnityEngine.Object asset, string abName)
        {
            string assetPath = PathUtils.GetRelativePathTo(Application.dataPath, assetDb.GetAssetPath(asset));
            var    importer  = AssetImporter.GetAtPath(assetPath);

            importer.SetAssetBundleNameAndVariant(abName, "");
        }
コード例 #2
0
 public SpriteEditorWindow()
 {
     m_EventSystem   = new EventSystem();
     m_UndoSystem    = new UndoSystem();
     m_AssetDatabase = new AssetDatabaseSystem();
     m_GUIUtility    = new GUIUtilitySystem();
 }
コード例 #3
0
 protected SpriteFrameModuleBase(string name, ISpriteEditor sw, IEventSystem es, IUndoSystem us, IAssetDatabase ad)
 {
     spriteEditor  = sw;
     eventSystem   = es;
     undoSystem    = us;
     assetDatabase = ad;
     m_ModuleName  = name;
 }
コード例 #4
0
 public Environment(IDirectory directory, IFile file, IAssetDatabase assetDatabase, IWebRequest webRequest, IBuildPipeline buildPipeline)
 {
     this.directory     = directory;
     this.file          = file;
     this.assetDatabase = assetDatabase;
     this.webRequest    = webRequest;
     this.buildPipeline = buildPipeline;
 }
コード例 #5
0
 public CoefController(BoxOptionsApiSettings settings, IAssetDatabase history, ILogRepository logRepository, ILog log, IGameManager gameManager, ICoefficientCalculator coefficientCalculator)
 {
     _settings              = settings;
     this.logRepository     = logRepository;
     this.history           = history;
     this.log               = log;
     _gameManager           = gameManager;
     _coefficientCalculator = coefficientCalculator;
 }
コード例 #6
0
 public HistoryHolder(BoxOptionsApiSettings settings, IAssetQuoteSubscriber subscriber, IAssetDatabase assetDatabase, ILog appLog)
 {
     _settings      = settings;
     _assetDatabase = assetDatabase;
     _log           = appLog;
     _subscriber    = subscriber;
     _holder        = new Dictionary <string, LinkedList <Price> >();
     isStarting     = true;
 }
コード例 #7
0
        public SpriteOutlineModule(ISpriteEditor sem, IEventSystem es, IUndoSystem us, IAssetDatabase ad, IGUIUtility gu, IShapeEditorFactory sef, ITexture2D outlineTexture)
        {
            spriteEditorWindow = sem;
            undoSystem         = us;
            eventSystem        = es;
            assetDatabase      = ad;
            guiUtility         = gu;
            shapeEditorFactory = sef;
            m_OutlineTexture   = outlineTexture;

            m_ShapeSelectionUI = new ShapeEditorRectSelectionTool(gu);

            m_ShapeSelectionUI.RectSelect     += RectSelect;
            m_ShapeSelectionUI.ClearSelection += ClearSelection;
        }
コード例 #8
0
        public static SpriteImportMode GetSpriteImportMode(IAssetDatabase assetDatabase, ITexture2D texture)
        {
            string           assetPath = assetDatabase.GetAssetPath(texture);
            SpriteImportMode result;

            if (string.IsNullOrEmpty(assetPath))
            {
                result = SpriteImportMode.None;
            }
            else
            {
                ITextureImporter assetImporterFromPath = assetDatabase.GetAssetImporterFromPath(assetPath);
                result = ((!(assetImporterFromPath == null)) ? assetImporterFromPath.spriteImportMode : SpriteImportMode.None);
            }
            return(result);
        }
コード例 #9
0
 private void OnEnable()
 {
     this.m_EventSystem            = new EventSystem();
     this.m_UndoSystem             = new UndoSystem();
     this.m_AssetDatabase          = new AssetDatabaseSystem();
     this.m_GUIUtility             = new GUIUtilitySystem();
     base.minSize                  = new Vector2(360f, 200f);
     base.titleContent             = SpriteEditorWindow.SpriteEditorWindowStyles.spriteEditorWindowTitle;
     SpriteEditorWindow.s_Instance = this;
     this.m_UndoSystem.RegisterUndoCallback(new Undo.UndoRedoCallback(this.UndoRedoPerformed));
     EditorApplication.modifierKeysChanged = (EditorApplication.CallbackFunction)Delegate.Combine(EditorApplication.modifierKeysChanged, new EditorApplication.CallbackFunction(this.ModifierKeysChanged));
     this.ResetWindow();
     this.RefreshPropertiesCache();
     this.RefreshRects();
     this.InitModules();
 }
コード例 #10
0
        public AssetQuoteSubscriber(BoxOptionsApiSettings settings, ILog log, IAssetDatabase history, IBoxConfigRepository boxRepo)
        {
            _isDisposing = false;
            _primaryStreamLastMessageTimeStamp = _secondaryStreamLastMessageTimeStamp = DateTime.UtcNow;
            _assetCache           = new List <InstrumentPrice>();
            this._settings        = settings;
            this._logger          = log;
            this._history         = history;
            this._boxRepo         = boxRepo;
            _lastPrices           = new Dictionary <string, InstrumentPrice>();
            _checkConnectionTimer = new System.Threading.Timer(CheckConnectionTimerCallback, null, -1, -1);

            _primaryGameInstruments = settings.PricesSettingsBoxOptions.PrimaryFeed.AllowedAssets.ToList();
            if (settings.PricesSettingsBoxOptions.SecondaryFeed != null)
            {
                _secondaryGameInstruments = settings.PricesSettingsBoxOptions.SecondaryFeed.AllowedAssets.ToList();
            }
        }
コード例 #11
0
 public SpritePhysicsShapeModule(ISpriteEditor sem, IEventSystem ege, IUndoSystem us, IAssetDatabase ad, IGUIUtility gu, IShapeEditorFactory sef, ITexture2D outlineTexture)
     : base(sem, ege, us, ad, gu, sef, outlineTexture)
 {
     spriteEditorWindow = sem;
 }
コード例 #12
0
 public SpritePolygonModeModule(ISpriteEditor sw, IEventSystem es, IUndoSystem us, IAssetDatabase ad) :
     base("Sprite Polygon Mode Editor", sw, es, us, ad)
 {
 }
コード例 #13
0
 public SpriteOutlineModule(ISpriteEditor sem, IEventSystem es, IUndoSystem us, IAssetDatabase ad, IGUIUtility gu, IShapeEditorFactory sef, ITexture2D outlineTexture)
 {
     this.spriteEditorWindow                 = sem;
     this.undoSystem                         = us;
     this.eventSystem                        = es;
     this.assetDatabase                      = ad;
     this.guiUtility                         = gu;
     this.shapeEditorFactory                 = sef;
     this.m_OutlineTexture                   = outlineTexture;
     this.m_ShapeSelectionUI                 = new ShapeEditorRectSelectionTool(gu);
     this.m_ShapeSelectionUI.RectSelect     += new Action <Rect, ShapeEditor.SelectionType>(this.RectSelect);
     this.m_ShapeSelectionUI.ClearSelection += new Action(this.ClearSelection);
 }
コード例 #14
0
 protected SpriteFrameModuleBase(string name, ISpriteEditor sw, IEventSystem es, IUndoSystem us, IAssetDatabase ad)
 {
     this.spriteEditor  = sw;
     this.eventSystem   = es;
     this.undoSystem    = us;
     this.assetDatabase = ad;
     this.moduleName    = name;
 }
コード例 #15
0
 public AssetDatabaseTemplateProvider(IAssetDatabase <GameObject> assetDatabase)
 {
     this.assetDatabase = assetDatabase;
 }
コード例 #16
0
 public HistoryController(IAssetDatabase history, IHistoryHolder histHolder, ILog appLog)
 {
     this.history    = history;
     this.appLog     = appLog;
     this.histHolder = histHolder;
 }