CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2014
    Posts
    4

    Question alittle C# help plz

    im a NEWBIE!!! to C# and following a book... and the code isnt doing as the book says..the book is telling me to use the Unity 3d engine
    plz keep it as newbie friendly as possible thank you
    Name:  helpppp.jpg
Views: 792
Size:  19.8 KB

    he code and the output isnt matching up right...what am i doing wrong...

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: alittle C# help plz

    I recommend posting over in the Unity Forum.

    http://forum.unity3d.com/forum.php

  3. #3
    Join Date
    Apr 2014
    Posts
    4

    Re: alittle C# help plz

    thx u..but I thought about that...but unity has it own language
    and figured if I posted their no one would use c#

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: alittle C# help plz

    Unfortunately, I can't read the text in the picture you've posted so I can't be much help.

  5. #5
    Join Date
    Apr 2014
    Posts
    4

    Re: alittle C# help plz

    well im at work atm when I get home ill put the block of code in the post

  6. #6
    Join Date
    Apr 2014
    Posts
    4

    Re: alittle C# help plz

    here is my code...
    using UnityEngine;
    using System.Collections;

    public class Leaningscript : MonoBehaviour
    {
    public int myNumber = 10;

    // Use this for initialization
    void Start ()
    {
    Debug.Log(2 + 9);//non varible should show 11

    Debug.Log(11 + myNumber); //using varibles should show 21
    }

    // Update is called once per frame
    void Update ()
    {

    }
    }

    now the line that should appear as 21 out puts as 20...
    i found out that if i change the variable in the code itself it doesnt change...
    but if i change it in the inspector panel it will change...so i guess i should prolly
    take this to the unity forums site....thx for ur help tho

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured