🌏 한국어
- LogViewer enables users to view Unity logs with device system information on the screen and to call APIs registered by developers.
- Install Game Package Manger
- Run : Unity Menu > Tools > GPM > Manager
- Service installation : LogViewer
- 2018.4.0 or higher
- Display the Unity logs on the screen.
- View only the desired logs using the
Category
orFilter
features. - Enable or disable the log type you need.
- Send logs via email
-
Menu
- Category
- Filter
- Search
- Print out only such logs that contain input characters.
- Ignore Case
- Select: Case sensitive
- Clear: Case insensitive
- Search
- Play Time
- Configure whether to display the time elapsed from the start of an app to when a log is created.
- Displays in seconds.
- Scene
- Configure whether to display the name of the scene in playing when there is a log.
- Send Mail
- Send all logs to specified email address.
- Save Log File
- Save the entire log to a local file.
- Clear
- Delete all logs.
-
Log Type
-
Log View
- Check the list of logs.
-
Log Details
- View details of a selected log from the list.
- User can call APIs added by developers from LogViewer.
- Cheat Key
- Pass string entered with callback registered through the AddCheatKeyCallback API.
- Command
- Call API registered by using the AddCommand API.
- View the device system information.
- Update Button
- Update system information.
- Configuring GpmLogViewer GameObject
- Add the GPM/LogViewer/Prefabs/GpmLogViewer.prefab file to the scene.
- Configuring Inspector
- Set Gesture Enable
- Enable or disable LogView gesture.
- Set Opener Enable
- Enable or disable the UI that activates Log View.
- Mail Setting
- To: The Recipient's email address
- User Name: Sender's email address
- User Password: Sender's email password
- Smtp Host: SMTP Host
- Smpt Port: SMTP Port
- Cc: Email address to be added for reference)
- Set Gesture Enable
-
All Platforms
- Change API compatibility level to .NET 2.0 or above, or .NET Standard 2.0 or above.
-
iOS
- When building using IL2CPP, create
link.xml
under the Assets folder and include the following.<linker> <assembly fullname="System"> <type fullname="System.Net.Configuration.MailSettingsSectionGroup" preserve="all"/> <type fullname="System.Net.Configuration.SmtpSection" preserve="all"/> <type fullname="System.Net.Configuration.SmtpNetworkElement" preserve="all"/> <type fullname="System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement" preserve="all"/> </assembly> </linker>
- When building using IL2CPP, create
-
Configuring Gmail
-
Must be set using app password.
-
Allow less secure apps will be unavailable after May 31, 2022.
- To : The Recipient's email address
- User Name : User Name: Sender's email address
- User Password : [app password] of the sending Sender's email address
- Smtp Host : smtp.gmail.com
- Smtp Port : 587
-
- Select the Security tab in your Google Account.
- In the Security tab, under Signing in to Google, select App password.
- 2-Step Verification must be enabled to set the App password.
- Under App password, tap Select app.
- In the app selection area, tap Other (Custom Name).
- Put Smtp Client in the name to Generate it.
- For User Password, use the app password for your device.
-
Enabling Each Platform
-
The following types of logs automatically trigger the LogViewer.
- LogType.Error
- LogType.Exception
using Gpm.LogViewer;
-
Category
- Inputting Categories
Debug.Log(GpmLogViewer.Instance.MakeLogWithCategory("TestLog", "UserCategory"));
- Inputting Categories
-
Log Type
- Log
Debug.Log("");
- Warnning
Debug.LogWarning("");
- Assert/Error/Exception
Debug.LogAssertion(""); Debug.LogError(""); Debug.LogException("");
- Log
- Cheat Key
- Adding Cheat Keys
public void AddCheatKeySample() { Function.Instance.AddCheatKeyCallback((cheatKey) => { Debug.Log("Call cheat key callback with : " + cheatKey); }); }
- Adding Cheat Keys
- Command
- Adding Commands
private void TestCommand(int index) { Debug.Log("Index : " + index); } public void AddCommandSample() { Function.Instance.AddCommand(this, "TestCommand", new object[] { 2 }); }
- Adding Commands