#Georgios1999's problem
1 messages · Page 1 of 1 (latest)
When I try that it prints out the same with the previous one: The type or namespace name 'batteryLevel' does not exist in the namespace 'SystemInformation' (are you missing an assembly reference?)
hmm
in the explorer I find 15 different System.Management.dll.
Cool story but you don't need any of them
That is what I wrote
No it's not
I just linked you. Unity provides this
You don't need a DLL or anything
Then why doens't it work? (even without the ddls)
Show your code
ok wait
You're definitely overcomplicating it
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.UI;
using TMPro;
using System.Management;
namespace SystemInformation
{
public class battery : MonoBehaviour
{
void Start()
{
Debug.Log(SystemInformation.batteryLevel);
}
}
}
Again
SystemInfo.batteryLevel, not what you wrote
Also
Why is your code in a SystemInformation namespace
Removed what
the namespace thing
i did
ok
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.UI;
using TMPro;
using System.Management;
public class battery : MonoBehaviour
{
void Start()
{
Debug.Log(SystemInfo.batteryLevel);
}
}
this is the current code
Ok and what error do you get if any