Giter Site home page Giter Site logo

modio-unity-legacy's People

Contributors

intenscia avatar jashanchittesh avatar melodatron avatar modio-jackson avatar stephenlucerne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modio-unity-legacy's Issues

Support for Input System

Currently throwing errors if application is solely using the new Input System package. Only workaround is to use "both" for PlayerSettings.activeInputHandling which is not ideal.

PluginSettings does not support overrides of game ID / API Key during builds

We have one project for multiple games, so have a build process that overrides game specific IDs like the Steam and Oculus game IDs. The mod.io UnityPlugin is the first time this requires a change in the plugin-code: With PluginSettings being just a wrapper, and Data being a struct, with static read-only access, we cannot override gameId and gameAPIKey.

My workaround, for now, is adding a property:

public Data InstanceData
{
    get => m_data;
    set => m_data = value;
}

Then, I load PluginSettings via Resources.Load..., get InstanceData, override gameId and gameAPIKey, and store the changed struct back into InstanceData. So this requires quite a bit of boilerplate code:

ModIO.PluginSettings modioPluginSettings = Resources.Load<ModIO.PluginSettings>(ModIO.PluginSettings.FILE_PATH);
            
ModIO.PluginSettings.Data modIOData = modioPluginSettings.InstanceData; 
modIOData.gameId = modioGameId;
modIOData.gameAPIKey = modioGameAPIKey;
modioPluginSettings.InstanceData = modIOData;
            
EditorUtility.SetDirty(modioPluginSettings);
            
AssetDatabase.SaveAssets();

This would be much smoother, if PluginSettings was a singleton, and PluginSettings.Data was a class instead of struct. For comparison, here is how we override the Oculus platform settings (PlatformSettings.Instance handles the loading for us, so we don't have to worry about where this is stored):

Oculus.Platform.PlatformSettings oculusPlatformSettings = Oculus.Platform.PlatformSettings.Instance;
Oculus.Platform.PlatformSettings.AppID = oculusApplicationId;
EditorUtility.SetDirty(oculusPlatformSettings);

System.DateTime.ToString can throw exceptions (used in ModIO.ValueFormatting.FormatValue)

Hi,
in our Unity Windows IL2CPP 2020 LTS project we have received automated exception reports from users who obviously have some kind of odd Windows culture setting.
Calls to System.DateTime can throw exceptions. We have fixed usages in our code but the mod.io plugin also accesses this.
Based on feedback of players we think this may happening for players with Indonesian OS setup.

We have resorted to wrapping access to code that does access SystemDate time with fallback to enforcing culture to use UTC and exception handling. It may be useful to do the same in this package.

The stack trace that showed up in our system is:

: ArgumentOutOfRangeException: Not a valid calendar for the given culture.

Parameter name: value

System.Globalization.DateTimeFormatInfo.set_Calendar (System.Globalization.Calendar value) (at <00000000000000000000000000000000>:0)
System.Globalization.CultureInfo.get_DateTimeFormat () (at <00000000000000000000000000000000>:0)
System.Globalization.DateTimeFormatInfo.get_CurrentInfo () (at <00000000000000000000000000000000>:0)
System.DateTime.ToString (System.String format) (at <00000000000000000000000000000000>:0)
ModIO.ValueFormatting.FormatValue (System.Object value, ModIO.ValueFormatting+Method method, System.String toStringParameter) (at <00000000000000000000000000000000>:0)
ModIO.UI.UserProfileFieldDisplay.OnEnable () (at <00000000000000000000000000000000>:0)
UnityEngine.Object.Instantiate[T] (T original) (at <00000000000000000000000000000000>:0)
ModIO.UI.UIUtilities.SetInstanceCount[T] (UnityEngine.Transform container, T template, System.String instanceName, System.Int32 instanceCount, T[]& instanceArray, System.Boolean reactivateAll) (at <00000000000000000000000000000000>:0)
ModIO.UI.ModfileContainer.DisplayModfiles (System.Collections.Generic.IList1[T] modfiles) (at <00000000000000000000000000000000>:0) ModIO.UI.ModReleaseHistoryDisplay+<>c__DisplayClass9_0.<RequestReleaseHistory>b__0 (ModIO.RequestPage1[T] r) (at <00000000000000000000000000000000>:0)
System.Action1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0) ModIO.APIClient+<>c__DisplayClass18_01[T].b__0 (System.String responseBody) (at <00000000000000000000000000000000>:0)
System.Action1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0) ModIO.APIClient.HandleGetResponse (UnityEngine.AsyncOperation operation) (at <00000000000000000000000000000000>:0) System.Action1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0)
UnityEngine.AsyncOperation.InvokeCompletionEvent () (at <00000000000000000000000000000000>:0)
UnityEngine.Object:Instantiate(T)
ModIO.UI.UIUtilities:SetInstanceCount(Transform, T, String, Int32, T[]&, Boolean)
ModIO.UI.ModfileContainer:DisplayModfiles(IList1) ModIO.UI.<>c__DisplayClass9_0:<RequestReleaseHistory>b__0(RequestPage1)
System.Action1:Invoke(T) ModIO.<>c__DisplayClass18_01:b__0(String)
System.Action`1:Invoke(T)
ModIO.APIClient:HandleGetResponse(AsyncOperation)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

Scrolling in mod preview

It is quite jarring and hard to do. From testing with stephen there must be something catching the mouse focus. He said you just need to fix the Unity "raycast" on the text fields most likely.

In-efficient API hits

Looking at API key usage, the Unity Plugin is currently doing 10x the number of requests as any other game. With significant variables due to in-game player numbers, amount of custom content available all outside our control - polling the system in a sustainable manner is very important for scalability.

Will need to continue exploring and engineering outcomes that balance flexibility with scalability.

Unable to build addressable content

It looks like it actually builds, but Addressable complains about the naming.

Tested with Addressable Version 1.18.9 - June 08, 2021

Address '_EditorImages [mod.io]' cannot contain '[ ]'. UnityEditor.GenericMenu:CatchMenu (object,string[],int)

image

UnityWebRequest.isNetworkError is obsolete

I installed 2.3.4 from Github and it seems to work fine, however, it's a little annoying to get a ton of warnings similar to this.

Assets\Plugins\mod.io\Runtime\RequestManagement\ImageRequestManager.cs(502,42): warning CS0618: 'UnityWebRequest.isNetworkError' is obsolete: 'UnityWebRequest.isNetworkError is deprecated. Use (UnityWebRequest.result == UnityWebRequest.Result.ConnectionError) instead.'

v2.1: Typo in Login Dialog: Resquest Security Code

Interestingly, that typo isn't there in v2.0.

Repro steps:

  1. Open ExampleScene
  2. Enter Play Mode
  3. Click on button on bottom right: mods powered by mod.io
  4. Enter your email-address

As soon as the email validation passes (i.e. you entered a valid email address), the button changes the text from "Authenticate" to "Re**s**quest Security Code". That first "s" should not be there.

This should be trivial to fix but as its in the prefab, probably not something where a pull request would make sense. See attached screenshot for where this is:

Capture_TypoResquest

Show only mods with specific tag

How to show only mods with a specific tag e.g A mod is In a category Platform => Android, show only mods that have this specific tag. to filter mods depending on their platform compatibility. I'm using the premade UI.

v2.1: Mod Details don't load, exception is thrown

When clicking on a Mod, the details pane shows up - but the data is not loaded. There are also two exceptions thrown the first time, and one exception thrown when closing / reopening the details:

On first click:

NullReferenceException: Object reference not set to an instance of an object
ModIO.UI.ModfileContainer.DisplayModfiles (System.Collections.Generic.IList`1[T] modfiles) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModfileContainer.cs:138)
ModIO.UI.ModfileContainer.OnEnable () (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModfileContainer.cs:99)
UnityEngine.GameObject:SetActive(Boolean)
ModIO.UI.ViewManager:InspectMod(Int32) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/ViewManager.cs:80)
ModIO.UI.ModView:InspectMod() (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/ModView.cs:119)
UnityEngine.EventSystems.EventSystem:Update()

NullReferenceException: Object reference not set to an instance of an object
ModIO.UI.ModfileContainer.DisplayModfiles (System.Collections.Generic.IList`1[T] modfiles) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModfileContainer.cs:138)
ModIO.UI.ModReleaseHistoryDisplay.RequestReleaseHistory (System.Int32 modId) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModReleaseHistoryDisplay.cs:98)
ModIO.UI.ModReleaseHistoryDisplay.RequestReleaseHistory (ModIO.ModProfile modProfile) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModReleaseHistoryDisplay.cs:87)
ModIO.UI.ModReleaseHistoryDisplay.SetModView (ModIO.UI.ModView view) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModReleaseHistoryDisplay.cs:68)
ModIO.UI.ModView.Start () (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/ModView.cs:109)

On second click:

NullReferenceException: Object reference not set to an instance of an object
ModIO.UI.UIUtilities.SetInstanceCount[T] (UnityEngine.Transform container, T template, System.String instanceName, System.Int32 instanceCount, T[]& instanceArray, System.Boolean reactivateAll) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/Utility/UIUtilities.cs:217)
ModIO.UI.ModfileContainer.DisplayModfiles (System.Collections.Generic.IList1[T] modfiles) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModfileContainer.cs:127) ModIO.UI.ModReleaseHistoryDisplay+<>c__DisplayClass9_0.<RequestReleaseHistory>b__0 (ModIO.RequestPage1[T] r) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/UI/DisplayComponents/ModReleaseHistoryDisplay.cs:122)
ModIO.APIClient+<>c__DisplayClass16_0`1[T].b__0 () (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/APIClient.cs:482)
ModIO.APIClient+<>c__DisplayClass15_0.b__0 (UnityEngine.AsyncOperation operation) (at C:/GameDev/GitHub/modio-UnityPlugin-AsPackage/src/APIClient.cs:450)
UnityEngine.AsyncOperation.InvokeCompletionEvent () (at C:/buildslave/unity/build/Runtime/Export/Scripting/AsyncOperation.cs:21)

Capture_DetailsNotLoaded

ModTeamMemberAccessLevel.Statistics same as Manager permission?

The file Runtime/Enums/ModTeamMemberAccessLevel.cs contains these definitions for TeamMember Access:

public enum ModTeamMemberAccessLevel
{
    Moderator = 1, // can moderate content submitted
    Statistics = 4, // moderator access, including read only access to view reports
    Administrator = 8, // full access, including editing the profile and team
}

But the "Edit Team" screen on the modio website lists these permissions:

Moderator - can moderate comments and content attached
Manager - moderator access, including uploading builds and editing settings except supply and team members
Administrator - full access, including editing the supply and team

Is ModTeamMemberAccess.Statistics the same as the "Manager" permission or not? I'm trying to filter mods based on who can upload new builds.

VR: UIBlur doesn't work with Single Pass (Stereo) Rendering

It does work with Multi Pass rendering - but I believe there are very few projects that still use multi pass rendering and it might even not be available on some platforms.

During a quick search I only found this Unity forum entry from 2016: Supporting Single Pass Stereo Rendering in Image Effects

I don't know much about Shader programming but I could probably point you to some heatwave shaders that do work well with Single Pass (and should be kind of similar in principle to the blur shader).

Unity Editor: mod.io menu is top level menu instead of under Tools

Menu "mod.io" is in top-level of the menu - should be below Tools (that's actually also an Asset Store guideline to prevent packages spamming the menu top-level ... unfortunately, that requirement is apparently not enforced much).

See also section 4.3.1 Editor Extensions in Unity Asset Store: Submission Guidelines.

See screenshot of our current project for why I care about this (and I haven't even added mod.io into the project, yet).

Capture_UnityToolBar

v2.1: Clicking "mods powered by mods.io" button "gets stuck"

When clicking the button "mods powered by mods.io" after previously logging in, you can "View Profile" and "Log Out". Those two things work - but the only way to exit that state is to log out. In other words, you cannot get "back to normal", e.g. by clicking anywhere on the UI, or viewing the profile.

"Log Out" works as expected (it logs out and restores the "normal state"). But once that button was clicked, you have to log out to get out of that state. You cannot "View profile" or click anywhere else to return to normal.

Asset Store Package: Includes Project Settings, sets scripting to 3.5

This is on Unity 2019.1 and probably doesn't come up as badly in previous Unity versions: The Asset Store Package comes with the project settings which are then overridden on import. Given that the mod.io UnityPlugin will usually be added to existing projects that have their own project settings already, this can cause trouble. If the mod.io UnityPlugin requires specific project settings, it would probably be preferable to document those and have developers apply them as needed.

When adding the Asset Store Package to an empty Unity 2019.1 project, this also causes compilation errors because it sets the Scripting Runtime Version to 3.5, which is deprecated. The compilation errors show up in the TextMesh Pro package which requires Scripting Runtime Version to be set to 4.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.