Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


Premium Member
  • Content Count

  • Joined

  • Last visited

  • Days Won


omard2000 last won the day on July 10 2018

omard2000 had the most liked content!

Community Reputation

126 Excellent

About omard2000

  • Rank
    PHP, C#, Unity, HTML, CSS
  • Birthday 08/20/2000

Profile Information

  • Gender
    Not Telling
  • Location:
    United States
  • Interests
    - PHP and C#

Recent Profile Visitors

2,260 profile views
  1. So it does not detect the collision, that's what you're saying? If so, make sure that one of the colliders has a non-kinetic rigidbody attached to it.
  2. Not sure what your script is called, but supposing that the boolean is in the other script it would look something like this: public bool toggle; void OnCollisionEnter(Collision collision) { if (toggle == true) { if (collision.collider.gameObject.tag == "blue") { collision.collider.gameObject.GetComponent<YourScript>().yourVariable = false; } } }
  3. Hi Everyone, I'm tweaking my login system at the moment and was wondering if anyone has any experience with PHP sessions with Unity? Do you know if it is possible to use PHP sessions while switching between scenes in Unity? By default a PHP session last 24 minutes (unless changed). Since the PHP Sessions are server side I was wondering if I could integrate them into Unity? Or would that not be possible? To better help understand my question, lets say that a user logged in (through the WWW stream from Unity to my database using PHP). Once the user is logged in, I create a session variable called 'name', would it be possible to access this session variable through PHP at a later time since the user is logged in? Thanks!
  4. Hi everyone, So at the moment I have two scripts, one which does inherit from Monobehaviour and the other that does not inherit from Monobehaviour. Right now, I am able to start coroutines in the non-monobehaviour script like this: public class PHP_LoginSystem : MonoBehaviour { private PHP_Account acc; public void Update () { if (Input.GetKeyDown (KeyCode.F)) { StartCoroutine(acc.RefreshProfile()); acc.Print(); } } } public class PHP_Account { public string id; public string username; public string email; public string status; public string parsedUsername; public string plainId; public void SetAccount (string _id, string _username, string _email, string _status) { // Code } public void Print () { Debug.Log(id); Debug.Log(username); Debug.Log(email); Debug.Log(status); } public IEnumerator RefreshProfile() { // Code } } My issue now is how can I create a Loader coroutine INSIDE the script that does not inherit from Monobehaviour? I know I can create a loader coroutine inside the script that does inherit from Monobehaviour but it would be very inconvenient as I would have to place the loader throughout a lot of scripts. Does anyone have any ideas on how to solve this? I the script PHP_LoginSystem I need the coroutine RefreshProfile to finish before calling the print function basically. Thanks!
  5. Never mind, stupid mistake I made lol. Thanks again!
  6. Ohh, this makes sense now. Thank you!
  7. What you are saying makes sense, but I don't understand the output that is being displayed in the console. This is the output with the code that you suggested: "Message from user System.String[]: System.Object[]" Shouldn't it be displaying the username and the message?
  8. Hello,I understand that whenever a message is received this function is called. However, I do not know how I can extract the information that is being received...public void OnGetMessages(string channelName, string[] senders, object[] messages) {string msg = "";for (int i = 0; i < senders.Length; i++) {msg = string.Format("{0}{1}={2}, ", msg, senders, messages);}Debug.LogFormat("OnGetMessages: {0} ({1}) > {2}", channelName, senders.Length, msg);}This is the code that I am referring to.For example, this is the output when I send the message "hello" from another user...OnGetMessages: channelA (1) > 1f83f13b-666d-4f11-97d6-d4adb6624242=hello, How can I get the sender name and the message sent from this information?Thanks!
  9. Yes. However, it will return a md5 hash of the Android ID. Make sure to take a look at the link below, the Unity version that you are using may make a difference. https://forum.unity.com/threads/unique-identifier-details.353256/
  10. omard2000

    Compiler error

    Go to Player Settings -> API compatibility level and make sure it is set to .NET 2.0 Subset
  11. Looks good
  12. I skimmed through the video and it does cover a decent amount. However, I would not recommend watching a 4 hour video in hope of mastering any programming language. You also did not mention if you have previous knowledge of other languages or C#. Personally, what I would do, is I would cover each topic in depth. For example, if you're learning about arrays I would look up a YouTube tutorial about arrays and find a video that really goes into depth and gives you fully explained code. Make sure to check out the documentation as well if you are having a hard time understanding a concept. I would consider this video somewhat of a starting point maybe? It really all comes down to what you are expecting to learn.
  13. Hi everyone, I am trying to retrieve an image (as a texture) from my website http://www.coldops.rf.gd/1.png through Unity's WWW stream. However, whenever I try downloading it through the WWW stream it displays a big red question mark instead. What is weird is that I have tried it with other images (from different websites) and it seems to be working just fine. Does anyone have any ideas what could be the issue here? For example, this website's image works just fine: http://gameassets.net/GameAssetsLogo.png Here is my code: using System.Collections; using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; public class News_Manager : MonoBehaviour { public RawImage image; IEnumerator Start () { WWW www = new WWW ("http://www.coldops.rf.gd/1.png"); yield return www; image.texture = www.texture; } } Thanks!
  14. Yeah, I just realized that too. In the OnDisable function it should be removecallbacktarget instead, but I don't think that's the issue. I ended up re-writing the script because I couldn't find where I went wrong lol. Hmm... but how would the user control the player and how would I send RPC calls? Shouldn't there only be one player per user?
  15. @OcularCash I checked and there is only 1 object in the scene in both edit and play mode with the script attached to it. Do you think it could be the OnEnable or OnDisable functions?
  • Create New...